install packages in Pycharm

匿名 (未验证) 提交于 2019-12-03 02:16:02

问题:

I installed PyCharm Community Edition 3.0 on windows 7 machine; and tried to install some common packages, like numpy, scipy...

I followed exactly the instruction from the JetBrains website http://www.jetbrains.com/pycharm/webhelp/installing-uninstalling-and-upgrading-packages.html

but the installation always fails...

"Install packages failed: Error occurred when installing package numpy...."

  Running setup.py egg_info for package numpy     Forcing DISTUTILS_USE_SDK=1     non-existing path in 'numpy\\distutils': 'site.cfg'     F2PY Version 2     blas_opt_info:     blas_mkl_info:       libraries mkl,vml,guide not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\libs']       NOT AVAILABLE  atlas_blas_threads_info: Setting PTATLAS=ATLAS   libraries ptf77blas,ptcblas,atlas not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\libs']   NOT AVAILABLE  atlas_blas_info:   libraries f77blas,cblas,atlas not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\libs']   NOT AVAILABLE  blas_info:   libraries blas not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\libs']   NOT AVAILABLE  blas_src_info:   NOT AVAILABLE    NOT AVAILABLE  lapack_opt_info: lapack_mkl_info: mkl_info:   libraries mkl,vml,guide not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\libs']   NOT AVAILABLE    NOT AVAILABLE  atlas_threads_info: Setting PTATLAS=ATLAS   libraries ptf77blas,ptcblas,atlas not found in C:\Python27\lib   libraries lapack_atlas not found in C:\Python27\lib   libraries ptf77blas,ptcblas,atlas not found in C:\   libraries lapack_atlas not found in C:\   libraries ptf77blas,ptcblas,atlas not found in C:\Python27\libs   libraries lapack_atlas not found in C:\Python27\libs numpy.distutils.system_info.atlas_threads_info   NOT AVAILABLE  atlas_info:   libraries f77blas,cblas,atlas not found in C:\Python27\lib   libraries lapack_atlas not found in C:\Python27\lib   libraries f77blas,cblas,atlas not found in C:\   libraries lapack_atlas not found in C:\   libraries f77blas,cblas,atlas not found in C:\Python27\libs   libraries lapack_atlas not found in C:\Python27\libs numpy.distutils.system_info.atlas_info   NOT AVAILABLE  lapack_info:   libraries lapack not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\libs']   NOT AVAILABLE  lapack_src_info:   NOT AVAILABLE    NOT AVAILABLE 

回答1:

You cannot install numpy and scipy like this. Depending on your build and Python version, install it from here.



回答2:

I had this same issue trying to install numpy 1.9.2 for python 3.4 (most recent version at 02/04/2015) I managed to fix this by downloading the .exe from http://sourceforge.net/projects/numpy/files/NumPy/1.9.2/numpy-1.9.2-win32-superpack-python3.4.exe/download and now I can use Numpy in pycharm

Hope this helps!

I'm also using Windows 10 TP so I'm guessing this should work on Win7/8/8.1 aswel



回答3:

For about 3 years, I have been using PyCharm as my Python IDE of choice. It is weird, and annoying, but often true, that you will frequently be unable to use PyCharm to install many packages. This has happened enough times with me that I just stopped using PyCharm to install packages. With a Mac, I install packages using MacPorts. With Windows 7, I download packages from the Unofficial Windows Binary site mentioned above by Games Brainiac.



回答4:

Download executable file of numpy from http://sourceforge.net/projects/numpy/files/NumPy/1.9.2/numpy-1.9.2-win32-superpack-python3.4.exe/download

It works for Window 7 also.

Thanks Rausta



回答5:

If you created an virtual environment to work in you still can install like "normal" with pip:

lsvirtualenv # check that a virtual environment exists  my_project_folder_VE="/home/${USER}/.virtualenvs"  my_project="TDD" cd ${my_project_folder_VE}  source ${my_project}/bin/activate lssitepackages # check for installed packages  pip install requests numpy pandas 

PyCharm will right away update the projects index and you can

import pandas as pd 


易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!