[英]Installing Virtual Environment with PIP for Python Via Mac OS X Terminal
所以,只是一個簡單的問題。 我已經在Mac OS X終端中通過Homebrew安裝了Python的Pip。 我試圖做的下一件事是通過pip install virtualenv安裝虛擬環境-這就是我遇到的問題。 我收到以下錯誤消息:
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_set.py", line 784, in install
**kwargs
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", line 345, in move_wheel_files
clobber(source, lib_dir, True)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", line 323, in clobber
shutil.copyfile(srcfile, destfile)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 83, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/virtualenv.py'
有人知道該怎么辦嗎? 我對這一切都是新手,所以我完全不知所措。
謝謝。
您是否看到過http://softwaretester.info/install-and-upgrade-pip-on-mac-os-x/這可能會幫助您,我是Windows用戶,因此其命令就像pip install package-name一樣,但是您必須在Windows中python27的腳本文件夾,但我不知道mac-os-x。 所以這樣做也將您的目錄更改為python27 / scripts ,然后使用pip命令
如果這對您有幫助,請豎起大拇指支持
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.