pip成功安装后:ModuleNotFoundError [英] after pip successful installed: ModuleNotFoundError

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

问题描述

我正在尝试安装SimPy模块,以便可以在IDLE中使用它.但是,每次我尝试导入IDLE时,都会出现错误.我已经尝试过重新安装Python和Pip,并试图修改应用程序的位置. SimPy可以在Python 2.7的目录中找到.我正在使用python 3.6.1.

I am trying to install the SimPy module so that I can use it in IDLE. However, everytime I try to import in IDLE, I got an error. I already tried reinstalling Python and Pip and tried to modify the location of the apps. SimPy can be found in the directory of Python 2.7. I'm using python 3.6.1.

在终端中正确安装了simpy之后:

After I correctly installed simpy in the terminal:

pip install simpy
Requirement already satisfied: simpy in /Library/Python/2.7/site-packages

当我进入空闲状态时:

Import Simpy

我得到了错误:

    Traceback (most recent call last):
  File "<pyshell#3>", line 1, in <module>
    import simpy
ModuleNotFoundError: No module named 'simpy'

我该如何解决?

推荐答案

由于您使用的是python 3.6.1,因此您可能需要指定要为其安装simpy的python类型.尝试运行pip3 install simpy将simpy模块安装到python3库中.

Since you are using python 3.6.1, you may need to specify the type of python you want to install simpy for. Try running pip3 install simpy to install the simpy module to your python3 library.

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

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