Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Changing Python Path
#1
I installed Anaconda so I could use Jupyter Notebook for an online Python course. Now when I try to run previous Python programs in Idle, I can't import anything.
For example,
import numpy
returns the error:
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
import numpy
ImportError: No module named 'numpy'

I think it has something to do with a default file path but I haven't found a solution yet.
Reply
#2
IDLE is probably using a separate python version that doesnt have any third party libraries installed. Use the Anaconda interpreter.
Recommended Tutorials:
Reply
#3
Ok. What is Anaconda interpreter? Is that a separate download?

Thx!
Reply
#4
You said you installed anaconda, right?
Anaconda is basically just python with 3rd party libs pertaining to data science along with it.

So if you installed anaconda it would have numpy along with it. Whereas if you used regular python numpy wouldnt be installed. I dont know anaconda's structure because i dont use it. But somewhere in it should be the python interpreter.

You could just install numpy to your other python that is using IDLE via pip also
pip install numpy
Go to your IDLE and find what python version it is using, and use that pip to install numpy.
Recommended Tutorials:
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Changing Function by Changing or without Changing its Parameters usmankhan 5 3,682 Jan-09-2018, 03:52 PM
Last Post: Windspar

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020