Reputation: 440
On Windows, open up Anaconda Prompt and type in the following:
pip install json2xml
No complaints from pip
for doing this (replace json2xml
with your favorite package, I guess). Then, open up Jupyter QTConsole, and try:
import json2xml
The result is an ImportError: No module named 'json2xml'
. The package installed (after checking pip list
), but nothing recognizes it. There is no system pip
(this is Windows, after all); only Anaconda's pip
is being used.
What's going on?
Upvotes: 2
Views: 2264
Reputation: 11
From How do I find the location of my Python site-packages directory? , you can enter
python -m site
to print your python package location(s). In my case, I have Anaconda for Windows and do not have a directory C:\Users\YOUR-USER-NAME\AppData\Local\Programs\Python\Python37-32\Lib\site-packages but did find my package installed with pip was in C:\Users\YOUR-USER-NAME\AppData\Local\Continuum\anaconda3\Lib\site-packages\ . This may be due to adding Anaconda to PATH.
Upvotes: 0
Reputation: 11
I hope this will help, it worked for me.
When you use pip to install a package, by default it will go to your python site-packages.
i. e.
C:\Users\YOUR-USER-NAME\AppData\Local\Programs\Python\Python37-32\Lib\site-packages
From here, you can copy the downloaded packages, then navigate and paste them into your Anaconda site-packages directory. i. e.
C:\Anaconda\Lib\site-packages
That should solve the issue.
Upvotes: 1