0

我无法在命令行上访问“C:\Program Files (x86)\Python37-32\Scripts”的内容,但我已将其配置为用户路径。

当我使用 Pip 安装 Python 包时,我收到一条警告消息,指出包的安装位置不在我的 PATH 上。所以我添加了 C:\Program Files (x86)\Python37-32\Scripts 作为名称 PythonScripts 下的路径。

WARNING: The script f2py.exe is installed in 'C:\Program Files (x86)\Python37-32\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

当我尝试运行位于 Python37-32\Scripts 文件夹中的文件(如 pip.exe)时,出现未找到该程序的错误。

pip.exe : The term 'pip.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Che
ck the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ pip.exe
+ ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (pip.exe:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
4

1 回答 1

0

可能有很多问题。

F2PY 使用支持许多 Fortran 77/90/95 编译器的 numpy_distutils

因为该库是一个Fortran 编译器,它可能不喜欢超过 8 个字符或包含符号和空格的目录名称。尝试安装到更简单的目录。

# Instead of this:
C:\Program Files (x86)\Python37-32\Scripts

# Replace with this:
C:\python37\Scripts

接下来,尝试使用完整的 numpy 实用程序。一般包裹存放在:

C:\...\python\Lib\site-packages  on Windows directory.

确保在那里安装了 numpy,并安装 f2.py,其中 numpy_distutils 在文件夹结构中。

然后将环境路径添加到

C:\python37\
C:\python37\Scripts\
C:\python37\Lib\
C:\python37\site-packages  

希望那会做到。

于 2019-07-31T15:27:42.477 回答