无法在OSX中升级python-dateutil

时间:2018-04-03 23:12:58

标签: python macos numpy pip python-dateutil

我正在尝试在OSX上安装Sphinx,希望最终将其变成一个网站,跟随this guide

我一直在macporting,homebrewing,python wheelin',搞清楚什么是virtualenv ...弄清楚我是否应该使用python 2.7或3.X(我无法弄清楚)

我将此添加到我的bash个人资料中:

export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/site-packages

当我运行时:

python -c "import sys; print('\n'.join(sys.path))"

我原以为它只返回/usr/local/lib/python2.7/site-packages

但是它说:

/Library/Python/2.7/site-packages/pip-10.0.0b2-py2.7.egg
/Library/Python/2.7/site-packages/virtualenv-15.2.0-py2.7.egg
/Users/nook
/usr/local/lib/python2.7/site-packages
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload
/Users/nook/Library/Python/2.7/lib/python/site-packages
/Library/Python/2.7/site-packages
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python

无论如何,我终于得到了一个virtualenv设置,并运行以下命令:

pip install sphinx

我整理了一个NumPy错误,另一个错误是六个。但我无法摆脱以下错误:

jupyter-client 5.2.3 has requirement python-dateutil>=2.1,
but you'll have python-dateutil 1.5 which is incompatible.

当我运行以下命令时:

pip install python-dateutil --upgrade --ignore-installed

我得到了

Collecting python-dateutil
Using cached python_dateutil-2.7.2-py2.py3-none-any.whl
Collecting six>=1.5 (from python-dateutil)
Using cached six-1.11.0-py2.py3-none-any.whl
Installing collected packages: six, python-dateutil`

这似乎很好......

但是当我再次尝试安装sphinx时,我得到了相同的

jupyter-client 5.2.3 has requirement python-dateutil>=2.1, but you'll have 
python-dateutil 1.5 which is incompatible.

所以我进去尝试了以下命令:

sudo rm -rf /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/python_dateutil-1.5-py2.7.egg-info/

我想删除该目录,NumPy目录和另一个dateutil目录......但是不能!我没有权限。

如果有人知道我的sphinx网站使用哪个版本的python(最新版本?),以及如何使用**版本的python设置虚拟环境,请找出Numpty和dateutil ..我将永远为你负债!

编辑:刚试过以下内容:

sudo pip install python-dateutil 
Password:
The directory '/Users/nick/Library/Caches/pip/http' or its parent directory is 
not owned by the current user and the cache has been disabled. Please check 
the permissions and owner of that directory. If executing pip with sudo, you 
may want sudo's -H flag.
The directory '/Users/nick/Library/Caches/pip' or its parent directory is not 
owned by the current user and caching wheels has been disabled. check the 
permissions and owner of that directory. If executing pip with sudo, you may 
want sudo's -H flag.
Requirement already satisfied: python-dateutil in 
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python 
(1.5)
pandas 0.22.0 has requirement numpy>=1.9.0, but you'll have numpy 1.8.0rc1 
which is incompatible.
matplotlib 1.3.1 has requirement numpy>=1.5, but you'll have numpy 1.8.0rc1 
which is incompatible.
jupyter-client 5.2.3 has requirement python-dateutil>=2.1, but you'll have 
python-dateutil 1.5 which is incompatible.

你可以看到我的numpy也是完全预算,在1.8.0rc1。感谢。

0 个答案:

没有答案