简体   繁体   中英

Cannot Import scipy in Jupyter Notebook

I run two line code, can you let me know what is the issue in importing the scipy in jupyter notebook Python Version is 3.7.7

! pip install scipy

Requirement already satisfied: scipy in c:\users\user\appdata\local\programs\python\python37\lib\site-packages (1.4.1)

Requirement already satisfied: numpy>=1.13.3 in c:\users\user\appdata\local\programs\python\python37\lib\site-packages (from scipy) (1.18.2)

import scipy

ImportError Traceback (most recent call last) in ----> 1 import scipy

c:\users\user\appdata\local\programs\python\python37\lib\site-packages\scipy__init__.py in 154 # This makes "from scipy import fft" return scipy.fft, not np.fft 155 del fft --> 156 from. import fft

c:\users\user\appdata\local\programs\python\python37\lib\site-packages\scipy\fft__init__.py in 74 from future import division, print_function, absolute_import 75 ---> 76 from._basic import ( 77 fft, ifft, fft2, ifft2, fftn, ifftn, 78 rfft, irfft, rfft2, irfft2, rfftn, irfftn,

c:\users\user\appdata\local\programs\python\python37\lib\site-packages\scipy\fft_basic.py in ----> 1 from scipy._lib.uarray import generate_multimethod, Dispatchable 2 import numpy as np 3 4 5 def _x_replacer(args, kwargs, dispatchables):

c:\users\user\appdata\local\programs\python\python37\lib\site-packages\scipy_lib\uarray.py in 25 from uarray import _Function 26 else: ---> 27 from._uarray import * 28 from._uarray import _Function 29

c:\users\user\appdata\local\programs\python\python37\lib\site-packages\scipy_lib_uarray__init__.py in 112 """ 113 --> 114 from._backend import * 115 116 version = '0.5.1+5.ga864a57.scipy'

c:\users\user\appdata\local\programs\python\python37\lib\site-packages\scipy_lib_uarray_backend.py in 13 import inspect 14 import functools ---> 15 from. import _uarray # type: ignore 16 import copyreg # type: ignore 17 import atexit

ImportError: DLL load failed: The specified module could not be found.

check to see if you are pip installing it with the right version and distribution of python that Jupiter is using.

Visual Studio Code, Anaconda/Jupyter, etc sometimes has their own installation of python that is not the one you might have downloaded at some point from the python website.

If you are using pip to install things, pip might be installed for another version you are using and adding it to the package list of another python installation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM