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

查看:39
本文介绍了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'

我该如何解决这个问题?

How can I solve this?

推荐答案

由于您使用的是 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天全站免登陆