关于从 PyCharm 安装 SciPy [英] Regarding installing SciPy from PyCharm

查看:169
本文介绍了关于从 PyCharm 安装 SciPy的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试在 Windows 7 上的 PyCharm 中安装 SciPy.但安装过程失败并显示以下错误消息.

然后我按照 查看在 PyCharm 中添加路径的一般摘要.

打开一个 Python 解释器,您可以在其中打开 SciPy.

<代码>>>进口scipy>>scipy.__file__路径/到/scipy"

这是我的路径:

C:\Users\ME\AppData\Local\Continuum\Anaconda3\Lib\site-packages\scipy

因此,SciPy 安装在 Continuum 中,而 Python 则安装在它自己的目录中.PyCharm 中的默认解释器路径在 Python 目录中查找,如下所示:

file://C:/Users/ME/AppData/Local/Programs/Python/Python35/DLLsfile://C:/Users/ME/AppData/Local/Programs/Python/Python35/Libfile://C:/Users/ME/AppData/Local/Programs/Python/Python35file://C:/Users/ME/AppData/Local/Programs/Python/Python35/Lib/site-packagesfile://C:/Users/ME/AppData/Local/Programs/Python/Python35/Lib/site-packages/win32file://C:/Users/ME/AppData/Local/Programs/Python/Python35/Lib/site-packages/win32/libfile://C:/Users/ME/AppData/Local/Programs/Python/Python35/Lib/site-packages/pythonwin

要解决此问题,请打开 PyCharm 并前往菜单 FileSettingsProject Interpreter.打开 ProjectInterprets,右侧有一个标记为显示路径"的小按钮.我添加了我到 SciPy 的路径:

file://C:/Users/ME/AppData/Local/Continuum/Anaconda3/Lib/site-packages/

继续在这里添加你的路径,你应该很高兴!

I have been trying to install SciPy in PyCharm on Windows 7. But the installation process failed with the following error message.

Then I followed the steps listed in install Python package with .whl file,

pip install wheel
pip install some-package.whl

The installation process was successful. However, I still cannot find the SciPy package from PyCharm.

解决方案

If you've gotten over the NumPy/wheel issues in installing SciPy on Windows 7, then this is a relatively quick fix. In short, you need to add the path where SciPy lives (only a few subfolders away from Python). You can see a general summary of adding paths in PyCharm here.

Open a Python Interpreter where you can open SciPy.

>> import scipy
>> scipy.__file__
"path/to/scipy"

Here is what my path looked like:

C:\Users\ME\AppData\Local\Continuum\Anaconda3\Lib\site-packages\scipy

So, SciPy is installed in Continuum, whereas Python lives in its own directory. The default interpreter paths in PyCharm look in the Python directory, shown below:

file://C:/Users/ME/AppData/Local/Programs/Python/Python35/DLLs
file://C:/Users/ME/AppData/Local/Programs/Python/Python35/Lib
file://C:/Users/ME/AppData/Local/Programs/Python/Python35
file://C:/Users/ME/AppData/Local/Programs/Python/Python35/Lib/site-packages
file://C:/Users/ME/AppData/Local/Programs/Python/Python35/Lib/site-packages/win32
file://C:/Users/ME/AppData/Local/Programs/Python/Python35/Lib/site-packages/win32/lib
file://C:/Users/ME/AppData/Local/Programs/Python/Python35/Lib/site-packages/pythonwin

To fix this, open PyCharm and head to menu FileSettingsProject Interpreter. Open the ProjectInterprets, and there is a small button on the right side labelled "show paths". I added my path up to SciPy:

file://C:/Users/ME/AppData/Local/Continuum/Anaconda3/Lib/site-packages/

Go ahead and add your path here, and you should be good to go!

这篇关于关于从 PyCharm 安装 SciPy的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆