Reputation: 17
I use python 3.6.4 and my OS is macOS High Sierra.
So I've installed pynput
. I can import it well on terminal, however, not on Python IDLE.
I've used sys.version
& sys.path
and they're the same. I only have python 3.6 installed on my Mac
Does anyone know the reason why and how I can solve it?
Upvotes: 1
Views: 1198
Reputation: 865
This happens because on the terminal you use Anaconda which is unknown to IDLE. You can use Spyder which comes with Anaconda
Edit: You'll find IDLE from: c:\Anaconda\Lib\idlelib\idle.bat
On mac i think you should do this pip install spyder
Upvotes: 0
Reputation: 13
This usually happens when you have multiple versions of python installed. Use this line of code in both IDLE and Terminal:
import sys
sys.version
sys.path
You will get system PATH of your current python. Now just delete one of them and that's it.
Upvotes: 1