Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/293.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 如何将NumPy 1.18.5用于蟒蛇3.8?_Python_Numpy_Anaconda_Version - Fatal编程技术网

Python 如何将NumPy 1.18.5用于蟒蛇3.8?

Python 如何将NumPy 1.18.5用于蟒蛇3.8?,python,numpy,anaconda,version,Python,Numpy,Anaconda,Version,我对Numpy 1.18.5版本有问题。我有蟒蛇3.8,它们似乎不兼容。我和水蟒领航员一起工作。很抱歉,如果这是非常基本的,但我是一个初学者在这个神奇的世界。先谢谢你。 这是我收到的错误消息: $ python Bikeshare.py C:\Users\Xabi\anaconda3\lib\site-packages\numpy\__init__.py:140: UserWarning: mkl-service package failed to import, therefore Intel

我对Numpy 1.18.5版本有问题。我有蟒蛇3.8,它们似乎不兼容。我和水蟒领航员一起工作。很抱歉,如果这是非常基本的,但我是一个初学者在这个神奇的世界。先谢谢你。 这是我收到的错误消息:

$ python Bikeshare.py
C:\Users\Xabi\anaconda3\lib\site-packages\numpy\__init__.py:140: UserWarning: mkl-service package failed to import, therefore Intel(R) MKL initialization ensuring its correct out-of-the box operation under condition when Gnu OpenMP had already been loaded by Python process is not assured. Please install mkl-service package, see http://github.com/IntelPython/mkl-service
  from . import _distributor_init
Traceback (most recent call last):
  File "Bikeshare.py", line 2, in <module>
    import pandas as pd
  File "C:\Users\Xabi\anaconda3\lib\site-packages\pandas\__init__.py", line 16, in <module>
    raise ImportError(
ImportError: Unable to import required dependencies:
numpy:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

    https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  * The Python version is: Python3.8 from "C:\Users\Xabi\anaconda3\python.exe"
  * The NumPy version is: "1.18.5"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: DLL load failed while importing _multiarray_umath: Das angegebene Modul wurde nicht gefunden. 
$python Bikeshare.py
C:\Users\Xabi\anaconda3\lib\site packages\numpy\\uuuuuu init\uuuuuuuuuuuupy.py:140:UserWarning:mkl服务包导入失败,因此无法保证在Python进程已加载Gnu OpenMP的情况下,英特尔(R)mkl初始化能够确保其正确的开箱即用操作。请安装mkl服务包,请参阅http://github.com/IntelPython/mkl-service
从…起导入\u分发服务器\u初始化
回溯(最近一次呼叫最后一次):
文件“Bikeshare.py”,第2行,在
作为pd进口熊猫
文件“C:\Users\Xabi\anaconda3\lib\site packages\pandas\\uuuuu init\uuuuuuuuuu.py”,第16行,在
引起恐慌(
ImportError:无法导入所需的依赖项:
努比:
重要提示:请阅读本文,了解如何解决此问题的建议!
导入numpy C扩展失败。此错误可能发生在
原因很多,通常是由于您的设置或NumPy的使用方式问题
安装。
我们在以下网站上汇编了一些常见原因和故障排除提示:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
请注意并检查以下内容:
*Python版本是:Python3.8,来自“C:\Users\Xabi\anaconda3\Python.exe”
*NumPy版本是:“1.18.5”
并确保它们是您期望的版本。
请仔细阅读上面链接的文档以获得进一步帮助。
原始错误是:导入_multiarray _umath:Das angegebene module wurde nicht gefunden时DLL加载失败。

我可以看到脚本导入Pandas时出现的错误。因此,您可能也需要更改Pandas版本

要检查您的Numpy,请执行以下操作: 试着先找到你的NumPy版本

import numpy as np
print(np.__version__)
1.18.5
如果不是您要查找的版本,请卸载当前版本并安装指定的版本:

pip uninstall numpy
pip install numpy==1.18.5

我不确定这是否是一个好主意,但我总是使用python的两个早期版本来确保所有依赖项都得到满足。由于python 3.9可用,我使用python 3.7来激活conda环境,因此出现了错误。请重试

C:\> conda activate
(Anaconda3) C:\> python Bikeshare.py

如果激活不起作用,则说明安装不完整。请重试

C:\> conda init

首先。

您是否遵循了错误消息中的说明?这也是一个非常常见的错误消息,您是否做过任何研究?这是否回答了您的问题?非常感谢您的建议,我肯定会这样做:)