简体   繁体   English

如何为Sypyy安装pycharm(python 3.6.1)(Windows 10)

[英]How to install Scipy for pycharm (python 3.6.1) (Windows 10)

I have currently tried multiple methods to download and use Scipy in Pycharm and have had no success yet. 我目前尝试了多种方法来在Pycharm中下载和使用Scipy,但还没有成功。 These are the methods that have already been tried. 这些是已经尝试过的方法。

methods tried so far: 到目前为止尝试过的方法:

  1. downloading scipy directly from the project interpreter in Pycharm. 直接从Pycharm的项目解释器下载scipy。 This did not work and returned the error. 这不起作用,并返回了错误。

    numpy.distutils.system_info.NotFoundError: no lapack/blas resources found numpy.distutils.system_info.NotFoundError:找不到lapack / blas资源

  2. downloading scipy-0.19.1.tar.gz then tried to load the package useing the 'project interpreter' in Pycharm This returned the same error as with method 1 下载scipy-0.19.1.tar.gz,然后尝试使用Pycharm中的“项目解释器”加载程序包。此方法返回与方法1相同的错误

  3. installing scipy using pip and pip 3 (both as user and admin) using the inputs and getting the outputs shown below. 使用输入并使用pip和pip 3(以用户和admin身份)安装scipy,并获得如下所示的输出。

显示错误:“ pip无法识别为内部或外部命令,可操作程序或批处理文件”

after doing some research on this problem i tried changing the path, which did not change the output. 在对此问题进行了一些研究之后,我尝试更改路径,但没有更改输出。

  1. using anaconda, was also recommended in multiple places so i downloaded it and installed scipy, THIS WORKED!!!! 在另一个地方也建议使用anaconda,所以我下载了它并安装了scipy,这很有效!!!

显示使用anaconda已成功安装程序,以及可能有用的任何其他信息

HOWEVER when trying to import scipy in Pycharm i was unable to call on it. 但是,当尝试在pycharm中导入scipy时,我无法调用它。 i have since tried making a virtual environment in the project interpreter but have still not been able to use scipy in pycharm. 从那以后,我尝试在项目解释器中创建虚拟环境,但仍无法在pycharm中使用scipy。

I am sure it is obvious by now I have no idea what I am doing, so the questions are... 我敢肯定,现在我不知道自己在做什么,所以问题很明显。

  1. what am i doing wrong with these methods? 这些方法有什么问题?
  2. what can be done to get scipy to work in pycharm? 如何使scipy在pycharm中工作?

Thanks in advance for any help offered. 在此先感谢您提供的任何帮助。

Edit: as I am sure this will be helpful here is the echo %PATH% return from console 编辑:因为我敢肯定这会有所帮助,这是从控制台返回的echo %PATH%

Add your Python Scripts folder into your PATH if you know how to do it. 如果知道如何将Python Scripts文件夹添加到PATH中。 Then you can use your pip and call install function. 然后,您可以使用pip并调用安装功能。

OR you can type following in your command prompt: 或者,您可以在命令提示符下键入以下内容:

set PATH=%PATH%;C:\Python27\Scripts
pip install scipy

if you have another version of python or another name for python folder change "Python27" to your folder name. 如果您使用其他版本的python或python文件夹的其他名称,请将“ Python27”更改为您的文件夹名称。

To check your current PyCharm interpreter go to File/Settings/Project:'project_name'/Project Interpreter 要检查您当前的PyCharm解释器,请转到文件/设置/项目:“ project_name” /项目解释器

在此处输入图片说明

And then install your scipy to that Python version. 然后将scipy安装到该Python版本。

EDIT 2 编辑2

  1. Previous versions of numpy installed useing pycharm must FIRST be fully uninstalled from site-packages in finder, eg: 必须首先从finder中的站点包中完全卸载使用pycharm安装的numpy的早期版本,例如:

     C:\\Users\\Denise\\AppData\\Local\\Programs\\Python\\Python36-32\\Lib\\site-packages 
  2. download the correct version of numpy+mkl and scipy for your python version from: http://www.lfd.uci.edu/~gohlke/pythonlibs/ 从以下位置下载适用于您的python版本的numpy + mkl和scipy的正确版本: http ://www.lfd.uci.edu/~gohlke/pythonlibs/

  3. Write this in your command prompt: 在命令提示符下输入:

     cd C:\\Users\\Denise\\AppData\\Local\\Programs\\Python\\Python36-32\\Scripts pip install C:\\Users\\Denise\\Downloads\\numpy-1.13.1+mkl-cp36-cp36m-win32.‌​whl pip install C:\\Users\\Denise\\Downloads\\scipy-0.19.1-cp36-cp36m-win32.whl 

line 1 is : cd (interpreter path from pycharm with 'python.exe replaced with 'Scripts') 第1行是:cd(来自pycharm的解释器路径,其中python.exe替换为“脚本”)

line 2 is : pip install (path of the downloaded numpy+mkl .whl file) 第2行是:pip install(下载的numpy + mkl .whl文件的路径)

line 3 is : pip install (path of the downloaded scipy .whl file) 第3行是:pip install(下载的scipy .whl文件的路径)

maybe if you have a version of numpy that isn't compiled by LAPAC . 也许您有LAPAC尚未编译的numpy版本。 Try to download it from: numpy-1.11.2+mkl-cp35-cp35m-win32.whl .Then run the following line: 尝试从numpy-1.11.2 + mkl-cp35-cp35m-win32.whl下载,然后运行以下行:

pip install --user numpy-1.11.2+mkl-cp35-cp35m-win32.whl --upgrade

NB: You should reinstall SciPys again 注意:您应该重新安装SciPys

if Python is not in your path : 如果Python不在您的路径中:

set PATH=%PATH%;C:\Python36\Scripts

I insist on the Python36 token, always use your current Python version in your path, then check for older version and remove them to exclude conflicts. 我坚持使用Python36令牌,请始终在路径中使用当前的Python版本,然后检查较旧的版本并删除它们以排除冲突。 Then you'll be able to 这样您就可以

pip install scipy

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM