我是一个经验丰富的R用户,我第一次尝试Python,但我在尝试安装软件包时遇到了麻烦。我猜在安装依赖项{scipy}时会出现问题,但我不确定如何解决它
我使用的是Windows 10 64位和VScode
(env) PS C:\Users\alber\Documents\Python\Titanic> pip install ggplot
Collecting ggplot
Using cached ggplot-0.11.5-py2.py3-none-any.whl (2.2 MB)
Collecting matplotlib
Using cached matplotlib-3.3.2.tar.gz (37.9 MB)
Collecting brewer2mpl
Using cached brewer2mpl-1.4.1-py2.py3-none-any.whl (24 kB)
Collecting statsmodels
Using cached statsmodels-0.12.0.tar.gz (17.5 MB)
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\alber\documents\python\titanic\env\scripts\python.exe' 'c:\users\alber\documents\python\titanic\env\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\alber\AppData\Local\Temp\pip-build-env-lcv198y3\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'cython>=0.29.14' 'numpy==1.15.4; python_version=='"'"'3.6'"'"'' 'numpy==1.15.4; python_version=='"'"'3.7'"'"'' 'numpy==1.17.5; python_version>='"'"'3.8'"'"'' 'scipy>=1.2'
cwd: None
Complete output (198 lines):
Ignoring numpy: markers 'python_version == "3.6"' don't match your environment
Ignoring numpy: markers 'python_version == "3.7"' 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>=0.29.14
Using cached Cython-0.29.21-py2.py3-none-any.whl (974 kB)
Collecting numpy==1.17.5
Using cached numpy-1.17.5.zip (6.4 MB)
Collecting scipy>=1.2
Using cached scipy-1.5.3.tar.gz (25.2 MB)
Installing build dependencies: started
Installing build dependencies: still running...
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: 'c:\users\alber\documents\python\titanic\env\scripts\python.exe' 'c:\users\alber\documents\python\titanic\env\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\alber\AppData\Local\Temp\tmplq20vzv8'
cwd: C:\Users\alber\AppData\Local\Temp\pip-install-xazfjpx9\scipy
Complete output (171 lines):
setup.py:460: UserWarning: Unrecognized setuptools command ('dist_info --egg-base C:\Users\alber\AppData\Local\Temp\pip-modern-metadata-a1axib6x'), proceeding with generating Cython sources and expanding templates
warnings.warn("Unrecognized setuptools command ('{}'), proceeding with "
Running from SciPy source directory.
lapack_opt_info:
lapack_mkl_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries mkl_rt not found in ['c:\\users\\alber\\documents\\python\\titanic\\env\\lib', 'C:\\']
NOT AVAILABLE
openblas_lapack_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries openblas not found in ['c:\\users\\alber\\documents\\python\\titanic\\env\\lib', 'C:\\']
get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']'
customize GnuFCompiler
Could not locate executable g77
Could not locate executable f77
customize IntelVisualFCompiler
Could not locate executable ifort
Could not locate executable ifl
customize AbsoftFCompiler
Could not locate executable f90
customize CompaqVisualFCompiler
Could not locate executable DF
customize IntelItaniumVisualFCompiler
Could not locate executable efl
customize Gnu95FCompiler
Could not locate executable gfortran
Could not locate executable f95
customize G95FCompiler
Could not locate executable g95
customize IntelEM64VisualFCompiler
customize IntelEM64TFCompiler
Could not locate executable efort
Could not locate executable efc
customize PGroupFlangCompiler
Could not locate executable flang
don't know how to compile Fortran code on platform 'nt'
NOT AVAILABLE
...
还有很多,所以我不想粘贴
有什么想法吗
Numpy需要与scipy一起安装。答案并不完全正确,但安装python所有科学工具的一种变通方法是安装Anaconda,它与您需要的工具一起预先打包。如果你还没有玩Jupyter笔记本,你会喜欢玩的
相关问题 更多 >
编程相关推荐