pycharm导包错误处理办法

给你一囗甜甜゛ 提交于 2020-03-12 07:47:51

今天写了一个项目,从虚拟机里面到出到物理机里面重新验证的时候导入requirements.txt里面的包报错,然后搜索一大堆,然后升级一堆东西,没用.于是又从报错代码入手,下面是报错代码↓↓↓↓↓

Command “python setup.py egg_info” failed with error code 1 in C:\Users\xxhaa\AppData\Local\Temp\pip-install-0eis_4zw\django-haystack\

翻译过来没什么用这个代码,于是从最开始的错误地方开始.代码如下

Complete output from command python setup.py egg_info:
Download error on https://pypi.org/simple/setuptools_scm/: ssl.c:761: The handshake operation timed out – Some packages may not
be found!
Download error on https://pypi.org/simple/setuptools-scm/: The read operation timed out – Some packages may not be found!
Couldn’t find index page for ‘setuptools_scm’ (maybe misspelled?)
Download error on https://pypi.org/simple/: ssl.c:761: The handshake operation timed out – Some packages may not be found!
No local packages or working download links found for setuptools_scm
Traceback (most recent call last):
File “”, line 1, in
File “C:\Users\xxhaa\AppData\Local\Temp\pip-install-0eis_4zw\django-haystack\setup.py”, line 71, in
setup_requires=[‘setuptools_scm’],
File "C:\Users\xxhaa\Desktop\myproject\hhyqshop_36\lib\site-packages\setuptools-40.8.0-py3.6.egg\setuptools_init
.py", line 1
44, in setup
File "C:\Users\xxhaa\Desktop\myproject\hhyqshop_36\lib\site-packages\setuptools-40.8.0-py3.6.egg\setuptools_init
.py", line 1
39, in install_setup_requires
File “C:\Users\xxhaa\Desktop\myproject\hhyqshop_36\lib\site-packages\setuptools-40.8.0-py3.6.egg\setuptools\dist.py”, line 724,
in fetch_build_eggs
File "C:\Users\xxhaa\Desktop\myproject\hhyqshop_36\lib\site-packages\setuptools-40.8.0-py3.6.egg\pkg_resources_init
.py", lin
e 782, in resolve
File “C:\Users\xxhaa\Desktop\myproject\hhyqshop_36\lib\site-packages\setuptools-40.8.0-py3.6.egg\pkg_resources_init_.py”, lin
e 1065, in best_match
File “C:\Users\xxhaa\Desktop\myproject\hhyqshop_36\lib\site-packages\setuptools-40.8.0-py3.6.egg\pkg_resources_init_.py”, lin
e 1077, in obtain
File “C:\Users\xxhaa\Desktop\myproject\hhyqshop_36\lib\site-packages\setuptools-40.8.0-py3.6.egg\setuptools\dist.py”, line 791,
in fetch_build_egg
File “C:\Users\xxhaa\Desktop\myproject\hhyqshop_36\lib\site-packages\setuptools-40.8.0-py3.6.egg\setuptools\command\easy_install
.py”, line 673, in easy_install
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse(‘setuptools_scm’)

----------------------------------------

Command “python setup.py egg_info” failed with error code 1 in C:\Users\xxhaa\AppData\Local\Temp\pip-install-0eis_4zw\django-haystack\

从上面细读来开,从蓝色的地方开始出错,下载egg_info包的时候出错了,可是错误并不是egg本身,而是绿色的部分,没有找到setuptools_scm导致egg_info无法安装,于是我抱着试试的心态执行了pip install -i https://pypi.douban.com/simple/ setuptools_scm,让后成功安装 setuptools_scm

在这里插入图片描述

后面就是一片顺风
在这里插入图片描述
这次的事情告诉我一定一定要认真的一行行的读代码.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!