我需要专门安装psycopg2 v2.4.1.我不小心做了:
pip install psycopg2
Run Code Online (Sandbox Code Playgroud)
代替:
pip install psycopg2==2.4.1
Run Code Online (Sandbox Code Playgroud)
这安装2.4.4而不是早期版本.
现在即使在我pip卸载psycopg2并尝试使用正确的版本重新安装之后,看来pip正在重新使用它第一次下载的缓存.
如何强制pip清除其下载缓存并使用我在命令中包含的特定版本?
我在安装PyAudio和portaudio时遇到问题。
当我python -m pip install pyaudio收到此错误时:
src/_portaudiomodule.c(29): fatal error C1083: Cannot open include file: 'portaudio.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.14.26428\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2
----------------------------------------
Command ""C:\Users\This PC\AppData\Local\Programs\Python\Python37-32\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\THISPC~1\\AppData\\Local\\Temp\\pip-install-3ock7jqh\\pyaudio\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\THISPC~1\AppData\Local\Temp\pip-record-14pe9p6y\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\THISPC~1\AppData\Local\Temp\pip-install-3ock7jqh\pyaudio\
Run Code Online (Sandbox Code Playgroud)
因此,在查找了该错误之后,我读到我需要安装portaudio。所以我做到了,python -m pip install portaudio并得到了这个错误:
Collecting portaudio
Could not find a version that satisfies the requirement portaudio (from …Run Code Online (Sandbox Code Playgroud)