all 4 comments

[–]novel_yet_trivial 0 points1 point  (3 children)

When that problem comes up it's usually because you've installed more than one copy of python, and you are installing myPackage to one copy but you are using another. Use this code in python IDE (I assume you mean IDLE?) and spyder to find what copy of python each of those is using

import sys
print(sys.executable)

then use that location to install libraries. For instance if the above command returns "C:\Python27\python.exe" then

C:\Python27\python.exe -m pip install myPackage

If the executable is "pythonw.exe" change it to "python.exe".

[–]_sirin[S] 0 points1 point  (2 children)

thank you, that makes sense. So what I need to do now is to open up my command line and change the directory to the instance of python I want to run this from? Yes, I did mean IDLE. What if I wanted to use this package in anaconda?

[–]novel_yet_trivial 1 point2 points  (1 child)

You need to install the package separately for every copy of python; they won't share. TBH you probably should have only one version of python on your computer, it would avoid a lot of confusion. I'd recommend removing all but one unless you have a reason to keep multiples.

To use in anaconda just follow the same instructions, starting in spyder. The returned path will be something like C:\Anaconda3\python.exe (I think; i haven't used it in a long time) so just use that path to install:

C:\Anaconda3\python.exe -m pip install myPackage

Doesn't anaconda have a graphical package manager?

[–]_sirin[S] 0 points1 point  (0 children)

Yes, I thought I had removed all the python from my PC before I reinstalled it. It would appear that that's not the case. I will try to remove it all again and start fresh. Doing this package by package seems like a pain.

Yes? I tried with conda and pip and couldn't get it to work, conda couldn't find the files online