Reputation: 25
I am relatively new to python and I was planning to use a module for iTunes in python, specifically this one https://github.com/robertf224/pyTunes and it shows that it has installed, but whenever i try to import the library into python, it shows no module is found. this is a picture of the errors and terminal
EDIT: Ok, so i have followed your instructions and it still does not seem to work. so this is the terminal:
Jeremys-iMac:~ Jeremy$ sudo pip3 install tunes Password:
The directory '/Users/Jeremy/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/Users/Jeremy/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Collecting tunes Downloading tunes-1.0.tar.gz Installing collected packages: tunes Running setup.py install for tunes ... done Successfully installed tunes-1.0 Jeremys-iMac:~ Jeremy$ Jeremys-iMac:~ Jeremy$ sudo python3 -m pip install tunes The directory '/Users/Jeremy/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/Users/Jeremy/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Requirement already satisfied: tunes in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages
and this is the python idle:
import tunes
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import tunes
ImportError: No module named 'tunes'
>>> import pytunes
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
import pytunes
ImportError: No module named 'pytunes'
>>> import pyTunes
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
import pyTunes
ImportError: No module named 'pyTunes'
>>> import tunes
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
import tunes
ImportError: No module named 'tunes'
>>> import tunes
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
import tunes
ImportError: No module named 'tunes'
>>>
Upvotes: 0
Views: 1413
Reputation: 135
You've installed the module under python 2.7, but you're trying to import it in python 3.5
So you would need to either import it from python 2.7 or use the pip corresponding to the python that (idle?) uses
Upvotes: 2