我有一個安裝了(默認情況下)安裝了Python 2.7.6
和我安裝了Python 3.4.0
的mac。如何指定使用Python 3的PIP版本(或爲什麼不是PIP工作)
我認爲我也可能安裝了多個PIP版本。 (當我運行PIP --version
我得到pip 1.5.6 from /Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg (python 2.7)
但我知道,Python 3
自帶1.5.4
版本
所以,我的問題是:
A.如何才能知道我是否有多個版本pip
已安裝
B.如果我確實安裝了多個版本,如何指定要使用哪個版本或安裝的軟件包位置ges應該去?
我試圖概括here(基本上使用pip-3.4
),但我得到的建議command not found
原因這一切的是,試圖與pip
安裝任何包的時候,竟然只是爲了更新(pip install --upgrade pip
)我得到以下錯誤
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/commands/install.py", line 283, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 1431, in install
requirement.uninstall(auto_confirm=True)
File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 598, in uninstall
paths_to_remove.remove(auto_confirm)
File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 1836, in remove
renames(path, new_path)
File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/util.py", line 295, in renames
shutil.move(old, new)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 299, in move
rmtree(src)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 247, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 252, in rmtree
onerror(os.remove, fullname, sys.exc_info())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 250, in rmtree
os.remove(fullname)
OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/EGG-INFO/dependency_links.txt'
Storing debug log for failure in /Users/Startec/Library/Logs/pip.log
你嘗試過''pip3''嗎?另外,一般來說,您可以在終端中編寫命令的開始,然後按兩次選項卡 - 這將顯示可能的擴展列表。 (如果只有一個,它會在第一次按下後完成。) – mmdeas 2015-01-20 22:01:11
您是否嘗試過pip3或pip3.4? – 2015-01-20 22:01:26