简体   繁体   中英

Anacaonda/Windows 10 - ModuleNotFoundError: No module named 'scipy'

I recently updated Anaconda (Spyder (Python 3.6), Windows 10). Several of my libaries disappeared and had to be re-installed. However, I have been unable to reinstall scipy. When I run "conda install scipy -f" from the Windows PowerShell, scipy seems to be reinstalled. However even if I close Spyder and restat Windows, I continue to get the error: ModuleNotFoundError: No module named 'scipy'.

I know that problems similar to this one have been posted previously, but I have been unable to find anything that seems to fix the problems.

Thanks in advance for any advice (and apologies if this question was posted yesterday as well).

I battled with this same issue. The reason is most likely because you already have a file in the current directory called scipy.py. For example, when I first started with scipy, i made a file literally called scipy.py to practice in. Then, when I tried to import scipy from a different file, the first instance of 'scipy.py' was my practice folder, rather than the actual package which was further into the directory.

I advise you check for folders that you may have named scipy.py that aren't the actual scipy package. I could be wrong, but it seems likely that python will first search the folder it saves your files to, and then trundle over to the packages folder saved elsewhere.

Hopefully this helps some other folks who are stumped by the same issue!

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