miniconda3 安装numpy_Miniconda“安装” numpy的,但Python无法导入它

So I have been having some trouble with this. I need to use numpy so that I can use OpenCV and so I installed Miniconda (Not Miniconda3 because we are working in Python 2.7) and I installed numpy with conda install numpy and it worked because when I run conda list I see that it is there:

Microsoft Windows [Version 10.0.10240]

(c) 2015 Microsoft Corporation. All rights reserved.

C:\Users\joe30_000>conda list

# packages in environment at C:\Users\joe30_000\Miniconda:

#

conda 3.17.0 py27_0

conda-env 2.4.2 py27_0

menuinst 1.0.4 py27_0

numpy 1.9.3 py27_0

pip 7.1.2 py27_0

pycosat 0.6.1 py27_0

pycrypto 2.6.1 py27_3

python 2.7.10 0

pyyaml 3.11 py27_2

requests 2.7.0 py27_0

setuptools 18.3.2 py27_0

wheel 0.26.0 py27_1

C:\Users\joe30_000>

And as you can see it is installed for Python 2.7. However, when I go to the python command line and try import numpy I get the error that no module exists:

Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)] on win32

Type "help", "copyright", "credits" or "license" for more information.

>>> import numpy

Traceback (most recent call last):

File "", line 1, in

ImportError: No module named numpy

>>>

Why is this happening? Do I have to somehow sync Conda with Python so that Python is using the modules that Miniconda has installed?

解决方案

So thanks to @Bubbafat, I found the solution and I want to post it in case anyone else has problems. Like Bubbafat said, conda has its own version of the Python interpreter. It is located in the Miniconda directory (It's called "Python.exe"). If you are using an IDE you need to switch the interpreter to use this version of Python rather than the default one you may have installed on the internet from the Python website itself. I hope this was helpful.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值