我遵循Tensorflow.org关于如何安装所有内容的指导方针,我觉得我一直在四处走动试图完成它。问题是我正在运行sudo easy_install pip
并且运行正常并且告诉我 pip 9.0.1已经是easy-install.pth中的活动版本所以一切都很好。指示的下一步是使用pip install --upgrade 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
`
请告知我接下来应该做什么。我不太清楚该怎么做。
答案 0 :(得分:0)
此处的问题是您的用户没有必要的权限来在该目录中安装软件包。
因此,一个简单的解决方案是使用sudo
ie:sudo pip install --upgrade virtualenv