Windows:已安装numpy(conda):ModuleNotFoundE

2024-09-27 21:27:10 发布

您现在位置:Python中文网/ 问答频道 /正文

我已经在我的环境中安装了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'>

Tags: pytestimportnumpyonedriveusersmodulewebscraper

热门问题