在vmware OS X上安装scrapy但获得各种异常

时间:2017-03-20 05:39:03

标签: python scrapy vmware

例外是,

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 316, in clobber
    ensure_dir(destdir)
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/utils/__init__.py", line 83, in ensure_dir
    os.makedirs(path)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/pyasn1'

3 个答案:

答案 0 :(得分:0)

也许你应该使用:

sudo pip install <package>

答案 1 :(得分:0)

OSError: [Errno 13] Permission denied:

这意味着你没有根渗透。 如果你使用的是ubuntu或mac,你可以使用

sudo pip install <package>
在您的终端类型

sudo gnome-terminal

这将为您提供root权限,然后您可以使用

pip install <package>

有些时候在Windows中出现相同的错误然后你需要以管理员身份运行cmd这将解决问题

保持编码不断学习

对Stackoverflow的称赞

答案 2 :(得分:0)

我的回答是在这个链接“https://www.tutorialspoint.com/scrapy/scrapy_environment.html

上找到的