我正在尝试使用以下方法在Windows 10的Python 3.8上安装sklearn(scikit-learn):
pip install sklearn
我也用过:
pip3 install sklearn
pip install scikit-learn
pip install -U scikit-learn
以及:
pip install --only-binary :all: sklearn
我也尝试过升级pip / setuptools。
有很多错误;其中,似乎相关的部分提到了Fortran:
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.distutils中没有名为“ numpy.distutils._msvccompiler”的模块;
我只是想知道这是否是因为3.8的新颖性吗?有没有人知道的解决方法?
它似乎围绕NumPy。我已经卸载了该软件包并重新安装了它。
刚刚发现此GitHub问题说了以下内容(16天前):
NumPy尚未正式支持Python 3.8。我们强烈建议您暂时坚持使用python 3.7,直到在PyPI numpy页面的“编程语言”部分中看到3.8的名称(大约数周),或者直到可以使用Python 3.8的Anaconda发行(可能数月)为止。
因此,看来它可能只是潜在的依赖项,尚不能在3.8中使用。实际上,上周我在另一个软件包中遇到了类似的问题。如果安装3.7.5,可能会很幸运。确保您获得正确的平台(32位为x86,64位为x64),并确保选中此框以将其添加到路径中。
我猜你是在Windows上吗?如果是这样,则在安装后打开Powershell并输入gcm python
,gcm pip
以确保将其从3.7安装中拔出。如果不是这样,则必须在系统环境变量中编辑PATH并将新的Python37目录移到PATH中的Python38之前。
希望能解决问题!
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句