soulfx / gmusic-playlist

playlist scripts for gmusic
MIT License
158 stars 57 forks source link

Newbie help on "ImportError: No module named gmusicapi" #29

Closed angadchawla closed 8 years ago

angadchawla commented 8 years ago

Hi,

I am a newbie at Python and I don't know a lot. I am using this guide (https://www.reddit.com/r/spotify/comments/35dgmj/instructions_to_import_music_from_spotify_into/) to transfer my music playlist from Spotify to Google Music. I am at the last step and I am getting this problem.

Angads-MacBook-Pro:gmusic-playlist-master Angad$ python ImportList.py ~/Desktop/Spotify.txt Traceback (most recent call last): File "ImportList.py", line 8, in <module> from common import * File "/Users/Angad/Downloads/gmusic-playlist-master/common.py", line 5, in <module> from gmusicapi import Mobileclient ImportError: No module named gmusicapi

I know that you have talked about this in another thread, but I could not understand an easy solution to this.

I hope that you can help me with this. Otherwise I am going to have to gruel though transferring my playlist song by song. :grin:

soulfx commented 8 years ago

gmusicapi can be installed either with pip or via the setup.py script. the setup.py script is what i use to install gmusicapi, but pip should also work. $ pip install gmusicapi to install via pip. you should be able to run this in any directory. if you don't have pip installed, check out instructions at https://pip.pypa.io/en/latest/installing/ $ python setup.py install to install with setup.py script. you'll be running this in the downloaded gmusicapi source directory.

angadchawla commented 8 years ago

gmusic-playlist-master Angad$ python setup.py install python: can't open file 'setup.py': [Errno 2] No such file or directory

Where do I get the setup.py file?

soulfx commented 8 years ago

you'll need to download the gmsuicapi source at https://github.com/simon-weber/gmusicapi and run python setup.py install from within the downloaded gmusicapi source directory.

angadchawla commented 8 years ago

You know what, thank you for helping me. But I am too much of a noon to work this out. It would be better if I just did the transfer one song at a time. Thanks again!

soulfx commented 8 years ago

don't feel too bad. python throws everyone for loops. systems can come pre-installed with it, but the system manages the packages differently than what pip expects, or there can be multiple python versions on the system. because of the differences it becomes a bit difficult to track down individual reasons for things not working.

the first time pip failed was due to it being unable to uninstall something called six, but the second time you tried pip you may not have run it with sudo. you'll probably need to run sudo on the python setup.py install if you go that route.

i hope you don't have too many songs to import. i wrote this import script after manually importing about 1k songs over the course of a couple hours.

soulfx commented 8 years ago

there is a javascript version you may be able to try out as an alternative to these python based scripts. it can be found at https://github.com/soulfx/gmusic-playlist.js

HaulinOats commented 8 years ago

Oh, I spent several hours today, in vain, trying to get the Google Music API working. I got my playlists and that data from spotify-export, which was pretty easy, it was trying to install the 'gmusicapi' that was giving me serious issues. Python was not working properly and kept giving me different errors, despite my efforts to download the proper packages and installing 'gmusicapi' through the downloaded git and running 'setup.py' in that directory. Thank God I found this thread and saw you created the Javascript version. It worked instantly for me.

If anyone at least has the necessary CSV files with the converted Spotify data, then I would highly recommend following the link soulfx put above gmusic-playlist.js. Much simpler process of importing to Google Music.

Much thanks, soulfx. You saved me a lot of headaches with that. Do you take donations?

soulfx commented 8 years ago

Hi brett, thanks for sharing your experience, tips, and recommendation. The more positive feedback I hear about the javascript version the more I'll try to raise awareness about it.

Donations are accepted and much appreciated via my paypal account soulfx@yahoo.com

angadchawla commented 8 years ago

Thank you for all the help!