1. 程式人生 > >安裝jupyter 時Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-bu、ipnel/ 問題解決

安裝jupyter 時Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-bu、ipnel/ 問題解決

解決方法,升級pip

sudo python -m pip install --upgrade --force pip 

sudo pip install setuptools==33.1.1

報錯:

File "/usr/bin/pip", line 9, in <module>     from pip import main ImportError: cannot import name main

解決方法

解決:pip檔案在usr/bin目錄下,cd進去,進行以下修改

把下面的三行

from pip import main if __name__ == '__main__':     sys.exit(main())

換成下面的三行

from pip import __main__ if __name__ == '__main__':     sys.exit(__main__._main()) 就不報錯了

但執行 pip install jupyter 報

Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/pandocfilters.pyc' Consider using the `--user` option or check the permissions.

在後面加上 --user就好了。