Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/346.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Windows:Installed numpy(conda):ModuleNotFoundError_Python_Python 3.x_Numpy_Conda - Fatal编程技术网

Python Windows:Installed numpy(conda):ModuleNotFoundError

Python Windows:Installed numpy(conda):ModuleNotFoundError,python,python-3.x,numpy,conda,Python,Python 3.x,Numpy,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 -

我已经在我的环境中安装了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'>
(pandaenv)C:\Users\LorenzKort\OneDrive-ITDS-Groep B.V\Documenten\Python>webscraper\u test.pyTraceback(最后一次调用):
文件“C:\Users\LorenzKort\OneDrive-ITDS Groep B.V\Documenten\Python\webscraper\u test.py”,第1行,在
将numpy作为np导入
ModuleNotFoundError:没有名为“numpy”的模块
(pandaenv)C:\Users\LorenzKort\OneDrive-ITDS Groep B.V\Documenten\Python>webscraper\u test.pyTraceback(最近一次调用最后一次):
文件“C:\Users\LorenzKort\OneDrive-ITDS Groep B.V\Documenten\Python\webscraper\u test.py”,第1行,在
将numpy作为np导入
ModuleNotFoundError:没有名为“numpy”的模块
(pandaenv)C:\Users\LorenzKort\OneDrive-ITDS-Groep B.V\Documenten\Python>Python
Python 3.7.0(默认值,2018年6月28日,08:04:48)[MSC v.1912 64位(AMD64)]::win32上的Anaconda自定义(64位)
有关详细信息,请键入“帮助”、“版权”、“信用证”或“许可证”。
>>>进口numpy
>>>努比

尝试运行
pip3安装numpy


另外,试着用python3 webscraper\u test.py运行你的脚本

我假设你已经安装了Python 2和Python 3?我只安装了Python 3.7删除numpy并用pip3重新安装它,尽管没有结果。使用Python3也会得到同样的结果。(我有一个“python”的别名,称为python3,但我认为这不是问题的一部分)