无法在Mac OS X EL Capitan上安装pycuda

时间:2016-01-26 21:19:53

标签: python python-3.4 osx-elcapitan pycuda

我试图在我的macbook pro上安装pycuda-2015.1.3。

我已经成功安装了CUDA,并且我正在使用python 3.4。

进入终端并进入pycuda文件夹后,我点击" sudo make"并获得以下输出:

ctags -R src || true
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ctags: illegal option -- R
usage: ctags [-BFadtuwvx] [-f tagsfile] file ...
/usr/local/bin/python3.4 setup.py build
---------------------------------------------------------------------------
Sorry, your build failed. Try rerunning configure.py with different options.
---------------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources.py", line 2421, in _dep_map
    return self.__dep_map
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources.py", line 2283, in __getattr__
    raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources.py", line 2412, in _parsed_pkg_info
    return self._pkg_info
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources.py", line 2283, in __getattr__
    raise AttributeError(attr)
AttributeError: _pkg_info

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "setup.py", line 229, in <module>
    main()
  File "setup.py", line 225, in main
    cmdclass={'build_py': build_py})
  File "/Users/shirgur/Downloads/pycuda-2015.1.3/aksetup_helper.py", line 23, in setup
    setup(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/setuptools/dist.py", line 239, in __init__
    self.fetch_build_eggs(attrs.pop('setup_requires'))
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/setuptools/dist.py", line 263, in fetch_build_eggs
    parse_requirements(requires), installer=self.fetch_build_egg
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources.py", line 577, in resolve
    requirements.extend(dist.requires(req.extras)[::-1])
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources.py", line 2232, in requires
    dm = self._dep_map
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources.py", line 2423, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources.py", line 2445, in _compute_dependencies
    for req in self._parsed_pkg_info.get_all('Requires-Dist') or []:
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources.py", line 2415, in _parsed_pkg_info
    self._pkg_info = Parser().parsestr(self.get_metadata(self.PKG_INFO))
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources.py", line 1310, in get_metadata
    return self._get(self._fn(self.egg_info,name)).decode("utf-8")
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources.py", line 1414, in _get
    stream = open(path, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: '/Users/shirgur/Library/Python/3.4/lib/python/site-packages/numpy-1.9.1.dist-info/METADATA'
make: *** [all] Error 1

1 个答案:

答案 0 :(得分:1)

我有两个版本的numpy。

在“pip uninstall numpy”之后删除了1.9文件,我从头开始安装了颠簸。

就是这样!