Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

import anaconda packages to IDLE?

I installed numpy, scipy, matplotlib, etc through Anaconda. I set my PYTHONPATH environment variable to include C://Anaconda; C://Anaconda//Scripts; C://Anaconda//pkgs;.

import sys sys.path shows that IDLE is searching in these Anaconda directories. conda list in the command prompt shows that all the desired packages are installed on Anaconda. But import numpy in IDLE gives me the error No module named numpy.

Suggestions? How do I tell IDLE where to look for modules/packages installed via Anaconda? I feel like I'm missing something obvious but I can't find an answer on any previous Overflow questions.

like image 636
Jonathan Brouwer Avatar asked Sep 25 '14 20:09

Jonathan Brouwer


People also ask

Does Anaconda work with IDLE?

IDLE is a very small and simple cross-platform IDE that is included free with Python and is released under the open-source Python Software Foundation License. Anaconda and Miniconda include IDLE.

How do I connect Anaconda to IDLE?

IDLE with Anaconda If you already have Anaconda installed on your system, just open the anaconda prompt from the start menu and type idle in the anaconda terminal, as shown below. Since IDLE comes packaged with Anaconda, you will need to download Anaconda from this website.

How do I import packages into Anaconda?

Go to Environments tab just below the Home tab and from there we can check what all packages are installed and what is not. It is very easy to install any package through anaconda navigator, simply search the required package, select package and click on apply to install it.


1 Answers

You need to add those directories to PATH, not PYTHONPATH, and it should not include the pkgs directory.

like image 138
asmeurer Avatar answered Oct 11 '22 14:10

asmeurer