安装问题:
报错:
You are using pip version 9.0.1, however version 20.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
解决方法:
直接运行命令:python -m pip install --upgrade pip
报错:
ModuleNotFoundError: No module named 'setuptools.config'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
解决方法:
直接运行命令:pip install --upgrade setuptools
报错:
FileNotFoundError: [WinError 2] 系统找不到指定的文件。: 'c:\\users\\anaconda3\\lib\\site-packages\\setuptools-27.2.0-py3.6.egg'
解决方法:
尝试重新安装,运行命令:pip install psychopy
报错:
解决方法:
总是下载不了,不断重新安装。应该也可以在官网或其他地方下载放在指定地方
最后终于下载好啦,但是继续报错,真的太难了。
报错:
ERROR: Could not install packages due to an EnvironmentError: HTTPSConnectionPool
解决方法:
直接运行命令:pip install --user pyspider
环境应该没有问题了,继续安装psychopy
报错:
ERROR: moviepy 1.0.3 has requirement numpy>=1.17.3; python_version != "2.7", but you'll have numpy 1.12.1 which is incompatible.
ERROR: python-gitlab 2.2.0 has requirement requests>=2.22.0, but you'll have requests 2.14.2 which is incompatible.
ERROR: pypiwin32 223 has requirement pywin32>=223, but you'll have pywin32 220 which is incompatible.
ERROR: xarray 0.15.1 has requirement numpy>=1.15, but you'll have numpy 1.12.1 which is incompatible.
ERROR: xarray 0.15.1 has requirement pandas>=0.25, but you'll have pandas 0.20.1 which is incompatible.
解决方法:
好像是版本重了,试一试直接安装numpy,发现已经安装了,算了不管了。
报错:
Failed building wheel for Twisted
解决办法:
安装twisted 在网上直接下载
twisted whl文件下载地址:
https://www.lfd.uci.edu/~gohlke/pythonlibs
找好自己对应的python版本35即3.5,下载后找到对应路径进行安装。
结果我找到对应版本后依然
报错:
ERROR: Twisted-19.10.0-cp35-cp35m-win_amd64.whl is not a supported wheel on this platform.
根据更新pip python -m pip install --upgrade pip
结果还是不行
解决方法:
命名不规范,修改命名
需要查看支持,但我还是一直报错
32位查看方法:
>>> import pip
>>> print(pip.pep425tags.get_supported())
64位查看方法:
在pip后加一个._internal
>>> import pip._internal
>>> print(pip._internal.pep425tags.get_supported())
[('cp36', 'cp36m', 'win32'), ('cp36', 'none', 'win32'), ('py3', 'none', 'win32')
, ('cp36', 'none', 'any'), ('cp3', 'none', 'any'), ('py36', 'none', 'any'), ('py
3', 'none', 'any'), ('py35', 'none', 'any'), ('py34', 'none', 'any'), ('py33', '
none', 'any'), ('py32', 'none', 'any'), ('py31', 'none', 'any'), ('py30', 'none ,'any')]
根据网上的结果,修改了名字:Twisted-19.10.0-py35-none-any.whl
报错:
ERROR: Command errored out with exit status 1:
command: 'c:\users\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\\AppData\\Local\\Temp\\pip-install-avxhekhq\\pyWinhook\\setup.py'"'"'; __file__='"'"'C:\\Users\\\AppData\\Local\\Temp\\pip-install-avxhekhq\\pyWinhook\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\AppData\Local\Temp\pip-wheel-qi0vh8v9'
解决方法:
根据提示安装需要的模块
报错:
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
解决方法:
继续更新 pip install --upgrade setuptools
报错:
ERROR: Failed building wheel for pyWinhook
解决方法:
同上,需要在网上下载whl文件后安装。
报错:
ERROR: Cannot uninstall 'pywin32'. It is a distutils installed project and thus we cannot accurately
解决方法:
pip install --ignore-installed xxx
佛系安装,最终终于弄好啦!
测试成功
话说很久以前下载的Anaconda,所有的都需要从头再来。还不如重新下载最新版本。下次记住,像这种集成开发包久了不用一定要重新下载最新的!!!
最后,以上解决方法几乎为百度结果。我只是桑代克的猫,也有可能是斯金纳的鸽子。
小结:
- 更新
- pip更新失败手动下载https://www.lfd.uci.edu/~gohlke/pythonlibs
- 注意whl文件命名问题
- 更新时无法卸载pip install --ignore-installed xxx
聊胜于无:小白的学习记录单