无法解决该错误
C:\Users\AJAY>python -m pip install pandas
Defaulting to user installation because normal site-packages is not writeable
Collecting pandas
Using cached pandas-1.1.3.tar.gz (5.2 MB)
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Program Files\Python39\python.exe' 'C:\Program Files\Python39\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\AJAY\AppData\Local\Temp\pip-build-env-425rumxj\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'Cython>=0.29.21,<3' 'numpy==1.15.4; python_version=='"'"'3.6'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.15.4; python_version=='"'"'3.7'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.17.3; python_version>='"'"'3.8'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.6'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.7'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.17.3; python_version>='"'"'3.8'"'"' and platform_system=='"'"'AIX'"'"''
cwd: None
Complete output (592 lines):
Ignoring numpy: markers 'python_version == "3.6" and platform_system != "AIX"' don't match your environment
Ignoring numpy: markers 'python_version == "3.7" and platform_system != "AIX"' don't match your environment
Ignoring numpy: markers 'python_version == "3.6" and platform_system == "AIX"' don't match your environment
Ignoring numpy: markers 'python_version == "3.7" and platform_system == "AIX"' don't match your environment
Ignoring numpy: markers 'python_version >= "3.8" and platform_system == "AIX"' don't match your environment
Collecting setuptools
Using cached setuptools-50.3.2-py3-none-any.whl (785 kB)
Collecting wheel
Using cached wheel-0.35.1-py2.py3-none-any.whl (33 kB)
Collecting Cython<3,>=0.29.21
Using cached Cython-0.29.21-py2.py3-none-any.whl (974 kB)
Collecting numpy==1.17.3
Using cached numpy-1.17.3.zip (6.4 MB)
Building wheels for collected packages: numpy
Building wheel for numpy (setup.py): started
Building wheel for numpy (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: 'C:\Program Files\Python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\AJAY\\AppData\\Local\\Temp\\pip-install-8fbili41\\numpy\\setup.py'"'"'; __file__='"'"'C:\\Users\\AJAY\\AppData\\Local\\Temp\\pip-install-8fbili41\\numpy\\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\AJAY\AppData\Local\Temp\pip-wheel-9thwik51'
cwd: C:\Users\AJAY\AppData\Local\Temp\pip-install-8fbili41\numpy\
Complete output (268 lines):
Running from numpy source directory.
blas_opt_info:
blas_mkl_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries mkl_rt not found in ['C:\\Program Files\\Python39\\lib', 'C:\\', 'C:\\Program Files\\Python39\\libs']
NOT AVAILABLE
答案 0 :(得分:1)
我认为您的问题是您拥有python 3.9,而numpy仅支持python 3.8。看到这里:https://docs.scipy.org/doc/scipy/reference/toolchain.html
解决方案是安装正确版本的python,然后安装pandas和numpy。
另一种(更好的)解决方案是使用Anaconda,它预先安装了numpy和pandas