导入错误:没有名为 numpy Anaconda 的模块

时间:2023-03-24
本文介绍了导入错误:没有名为 numpy Anaconda 的模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个与这个问题非常相似的问题.我的 Windows 7 64 位系统上只安装了一个版本的 python 3.5.我通过官方网站安装了 Anaconda3.4 - 正如问题中所建议的那样.安装很顺利,但是当我想导入时(我只是从命令行输入 python)

I have a very similar question to this question. I have only one version of python 3.5 installed on my Windows 7 64-bit system. I installed Anaconda3.4 via official website - as suggested in the question. The installation went fine but when I want to import(I just typing python from the command line )

import numpy

Import error:No module named numpy

然后我退出并输入

pip install numpy 

要求已经满足(使用--upgrade 升级):numpy in d:program filesanaconda3libsite-packages

Requirement already satisfied (use --upgrade to upgrade): numpy in d:program fi lesanaconda3libsite-packages

我知道这可能是一个超级基本的问题,但我仍在学习...谢谢

I know this is probably a super basic question, but I'm still learning... Thanks

推荐答案

如果您使用的是 Anaconda3,那么您应该已经安装了 numpy.没有理由使用 pip.我的猜测是 Anaconda 发行版可能不在您的路径上,而您正在选择其他系统 python.

If you are using Anaconda3 then you should already have numpy installed. There is no reason to use pip. My guess is that the Anaconda distribution is possibly not on your path and you are picking up some other system python.

您应该运行 where python(或 where python3)来查看您使用的是哪一个.如果可执行文件不在 Anaconda 安装中,那么这是您的问题,您需要编辑路径环境变量以确保打开所需的 python.

You should run where python (or where python3) to see which one you are using. If the executable is not in the Anaconda install, then that is your problem and you will need to edit your path environment variable to ensure that you are opening the python you want.

这篇关于导入错误:没有名为 numpy Anaconda 的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

上一篇:Conda install some-package 挂起(解决环境:失败) 下一篇:Windows 下 Conda 虚拟环境不变

相关文章

最新文章