Python 2.7与3.8安装因网络错误而失败

时间:2019-11-17 17:06:03

标签: python installation package

当我尝试运行命令pip install -e时,
我在python38上遇到以下错误,但在python27上有效。

有人可以帮忙吗?

command: /home/myname/virtualenvs/python38/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/myname/projectname/projectname/setup.py'"'"'; __file__='"'"'/home/myname/projectname/projectname/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info
         cwd: /home/myname/projectname/projectname/
    Complete output (25 lines):
    Download error on https://pypi.org/simple/pbr/: [Errno 101] Network is unreachable -- Some packages may not be found!
    Couldn't find index page for 'pbr' (maybe misspelled?)
    Download error on https://pypi.org/simple/: [Errno 101] Network is unreachable -- Some packages may not be found!
    No local packages or working download links found for pbr>=1.8
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/home/myname/projectname/projectname/setup.py", line 33, in <module>
        setuptools.setup(
      File "/home/myname/virtualenvs/python38/lib/python3.8/site-packages/setuptools/__init__.py", line 144, in setup
        _install_setup_requires(attrs)
      File "/home/myname/virtualenvs/python38/lib/python3.8/site-packages/setuptools/__init__.py", line 139, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "/home/myname/virtualenvs/python38/lib/python3.8/site-packages/setuptools/dist.py", line 716, in fetch_build_eggs
        resolved_dists = pkg_resources.working_set.resolve(
      File "/home/myname/virtualenvs/python38/lib/python3.8/site-packages/pkg_resources/__init__.py", line 780, in resolve
        dist = best[req.key] = env.best_match(
      File "/home/myname/virtualenvs/python38/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1065, in best_match
        return self.obtain(req, installer)
      File "/home/myname/virtualenvs/python38/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1077, in obtain
        return installer(requirement)
      File "/home/myname/virtualenvs/python38/lib/python3.8/site-packages/setuptools/dist.py", line 786, in fetch_build_egg
        return cmd.easy_install(req)
      File "/home/myname/virtualenvs/python38/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 673, in easy_install
        raise DistutilsError(msg)
    distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('pbr>=1.8')
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

0 个答案:

没有答案
相关问题