【发布时间】:2018-09-21 14:01:49
【问题描述】:
我在我的环境中安装了 conda numpy,它似乎在命令行中工作。
然而,当我运行一个导入它的文件时,我得到一个
ModuleNotFoundError
这些是我的包裹:
(pandaenv) C:\Users\LorenzKort\OneDrive - ITDS Groep B.V\Documenten\Python>webscraper_test.pyTraceback (most recent call last):
File "C:\Users\LorenzKort\OneDrive - ITDS Groep B.V\Documenten\Python\webscraper_test.py", line 1, in <module>
import numpy as np
ModuleNotFoundError: No module named 'numpy'
(pandaenv) C:\Users\LorenzKort\OneDrive - ITDS Groep B.V\Documenten\Python>webscraper_test.pyTraceback (most recent call last):
File "C:\Users\LorenzKort\OneDrive - ITDS Groep B.V\Documenten\Python\webscraper_test.py", line 1, in <module>
import numpy as np
ModuleNotFoundError: No module named 'numpy'
(pandaenv) C:\Users\LorenzKort\OneDrive - ITDS Groep B.V\Documenten\Python>python
Python 3.7.0 (default, Jun 28 2018, 08:04:48) [MSC v.1912 64 bit (AMD64)] :: Anaconda custom (64-bit) on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy
<module 'numpy' from 'C:\\Users\\LorenzKort\\Miniconda3\\envs\\pandaenv\\lib\\site-packages\\numpy\\__init__.py'>
【问题讨论】:
-
我假设你已经安装了 Python 2 和 Python 3?
-
我只安装了 Python 3.7
标签: python python-3.x numpy conda