简体   繁体   中英

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. These are the methods that have already been tried.

methods tried so far:

  1. downloading scipy directly from the project interpreter in Pycharm. This did not work and returned the error.

    numpy.distutils.system_info.NotFoundError: no lapack/blas resources found

  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

  3. installing scipy using pip and pip 3 (both as user and admin) using the inputs and getting the outputs shown below.

显示错误:“ 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已成功安装程序,以及可能有用的任何其他信息

HOWEVER when trying to import scipy in Pycharm i was unable to call on it. i have since tried making a virtual environment in the project interpreter but have still not been able to use scipy in pycharm.

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?

Thanks in advance for any help offered.

Edit: as I am sure this will be helpful here is the echo %PATH% return from console

Add your Python Scripts folder into your PATH if you know how to do it. Then you can use your pip and call install function.

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.

To check your current PyCharm interpreter go to File/Settings/Project:'project_name'/Project Interpreter

在此处输入图片说明

And then install your scipy to that Python version.

EDIT 2

  1. Previous versions of numpy installed useing pycharm must FIRST be fully uninstalled from site-packages in finder, eg:

     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/

  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')

line 2 is : pip install (path of the downloaded numpy+mkl .whl file)

line 3 is : pip install (path of the downloaded scipy .whl file)

maybe if you have a version of numpy that isn't compiled by LAPAC . Try to download it from: numpy-1.11.2+mkl-cp35-cp35m-win32.whl .Then run the following line:

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

NB: You should reinstall SciPys again

if Python is not in your path :

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. Then you'll be able to

pip install scipy

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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