安装Twisted执行python3 setup.py install报错

来源:2-1 scrapy的安装、和安装中遇到的问题

錳鈊4062105

2018-07-14 19:49

[bigdata@elephant Twisted-17.1.0]$ python3 setup.py install
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/site-packages/setuptools/dist.py", line 353, in fetch_build_egg
    cmd = self._egg_fetcher
AttributeError: 'Distribution' object has no attribute '_egg_fetcher'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "setup.py", line 21, in <module>
    setuptools.setup(**_setup["getSetupArgs"]())
  File "/usr/local/lib/python3.4/distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/usr/local/lib/python3.4/site-packages/setuptools/dist.py", line 269, in __init__
    self.fetch_build_eggs(attrs['setup_requires'])
  File "/usr/local/lib/python3.4/site-packages/setuptools/dist.py", line 313, in fetch_build_eggs
    replace_conflicting=True,
  File "/usr/local/lib/python3.4/site-packages/pkg_resources/__init__.py", line 826, in resolve
    dist = best[req.key] = env.best_match(req, ws, installer)
  File "/usr/local/lib/python3.4/site-packages/pkg_resources/__init__.py", line 1092, in best_match
    return self.obtain(req, installer)
  File "/usr/local/lib/python3.4/site-packages/pkg_resources/__init__.py", line 1104, in obtain
    return installer(requirement)
  File "/usr/local/lib/python3.4/site-packages/setuptools/dist.py", line 372, in fetch_build_egg
    install_dir = self.get_egg_cache_dir()
  File "/usr/local/lib/python3.4/site-packages/setuptools/dist.py", line 337, in get_egg_cache_dir
    os.mkdir(egg_cache_dir)
PermissionError: [Errno 13] Permission denied: './.eggs'

写回答 关注

2回答

  • 大壮老师
    2018-07-15 07:53:33

    看最后一句

  • yuzhewo
    2018-09-07 21:21:35

    权限问题 sudo试试

Python最火爬虫框架Scrapy入门与实践

做为爬虫工程师Python Scrapy主流爬虫框架你必须要会!

67418 学习 · 223 问题

查看课程

相似问题