我正在尝试在我的 mac 机器上安装 pycuda。问题是,当我使用 sudo 运行 python 时,它得到了 python-6 的错误版本,这是 pycuda 所需的。我怎样才能解决这个问题?
Jean-Lucs-MacBook-Pro:test Jean$ sudo python
Password:
Python 2.7.6 (default, Sep 9 2014, 15:04:36)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pkg_resources
>>> pkg_resources.get_distribution("six").version
'1.4.1'
>>> import six
>>> print six.__file__
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six.pyc
>>>
Jean-Lucs-MacBook-Pro:test Jean$ python
Python 2.7.6 (default, Sep 9 2014, 15:04:36)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pkg_resources
>>> pkg_resources.get_distribution("six").version
'1.9.0'
>>> import six
>>> print six.__file__
/usr/local/lib/python2.7/site-packages/six.pyc
>>>