First, I've looked through other people's questions that sound similar and haven't found a situation like mine. If you know of another post that solves my problem, I'm all ears (eyes, whatever).
I have been using Spyder through Anaconda for most of my Python work up to now, but I don't really like it that much. So, I'm trying to explore other IDEs, currently Atom. I have set up Atom and cmd.exe
to run Python from the Anaconda install by adding the .\Anaconda3 folder to my path. I have also added the .\Anaconda3\Lib\site-packages
and everywhere else I have found that anaconda has stored its modules (within the base environment).
Python runs fine in the Command Prompt and in Atom (using "script" package), but for some reason I cannot import any modules except sys
and os
unless I use either the Anaconda terminal or one of its included IDEs. I can't even import numpy
, though I can navigate to the site-packages folder in File Explorer and see it in there. Below is a screen shot showing side-by-side the Anaconda Prompt and Command Prompt. You can see that my path variable and executable are the same in both, but conda imports numpy
just fine while cmd
cannot. I would like to know why and how to fix it. All of the other questions I saw of this issue (StackOverflow and elsewhere) said to add the file path to the module to my PATH variable
(which I have done) or run the program using the Anaconda executable
(which I am doing).
Command Prompt
vs Anaconda Prompt
exectuable, path variable and importing numpy
Also, I searched for the ImportError
(shown in the picture) on the internet and found a link to the Anaconda documentation saying to check the System32
folder for mkl related dll's but there weren't any in mine. Then I looked through the _distributor_init.py
file in the numpy
folder to figure out where it was trying to pull the _mklinit
function from and see if maybe it was looking somewhere different from Anaconda. But if I understand correctly the "from . import" means that it's looking in the same numpy
directory for that function and there is a file in there called _mklinit.cp37-win_amd64.pyd
(which I can't look at the contents of, but it seems like a good candidate to me). In any case, it seems like it looks in the same location for both Command Prompt and Anaconda Prompt, so that didn't help either.
I was going to install Python separately from Anaconda, but I've heard that I can cause problems for myself unless I know what I'm doing (which I don't). So, I would like to do this by just accessing the packages that Anaconda has, which everyone keeps saying I can do but it isn't working for me so far.
It's possible I'm dumb, but I don't get it. Any help would be appreciated.
Running:
Windows 10
Python 3.7.4
Anaconda 4.8.3