Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation process #1

Open
theNailz opened this issue Aug 27, 2013 · 23 comments
Open

Installation process #1

theNailz opened this issue Aug 27, 2013 · 23 comments

Comments

@theNailz
Copy link
Contributor

Here is my install history, cleaned up and documented for howto/wiki/readme purposes.

Installed on Debian 6.0 Linux 2.6.32-5-686 i686 GNU/Linux

# Go home!
cd ~

# Install libspotify
wget https://developer.spotify.com/download/libspotify/libspotify-12.1.51-Linux-i686-release.tar.gz
tar vzxf libspotify-12.1.51-Linux-i686-release.tar.gz
cd libspotify-12.1.51-Linux-i686-release/
sudo make install prefix=/usr/local
cd ..

# Fetch spotifyripper
wget https://github.com/robbeofficial/spotifyripper/archive/master.zip
unzip master.zip

# Install pyspotify-dev
wget https://github.com/mopidy/pyspotify/tarball/develop#egg=pyspotify-dev
tar vzxf develop

# Install mopidy apt source
wget -q -O - https://apt.mopidy.com/mopidy.gpg | sudo apt-key add -
sudo wget -q -O /etc/apt/sources.list.d/mopidy.list https://apt.mopidy.com/mopidy.list

# Copy the jukebox dependency
cd spotifyripper-master/
cp ../mopidy-pyspotify-ef75737/examples/jukebox.py .
mv /YOUR/PATH/TO/spotify_appkey.key .
cd ..

# Install dependencies and tools: SEE NOTE BELOW
sudo apt-get update
sudo apt-get install mopidy python-spotify lame eyed3

# Let it rip
cd spotifyripper-master/
screen ./jbripper.py <username> <password> <playlist|track>


# NOTES:
# - eye3d (0.6.18-1) from APT is incompatible
@atmos
Copy link

atmos commented Sep 10, 2013

Thanks @theNailz, I was about to give up and found your info. I got it working on OS X Mavericks. 💃

@jhnvz
Copy link

jhnvz commented Dec 27, 2013

@atmos love some instructions on how you installed the dependencies on osx. I installed all dependencies mentioned in the README. However I get the following error:

Traceback (most recent call last):
  File "./jbripper.py", line 5, in <module>
    from spotify import Link, Image
ImportError: No module named spotify

@jhnvz
Copy link

jhnvz commented Dec 27, 2013

Nevermind. Fixed it by running:

PYTHONPATH=/usr/local/lib/python2.7/site-packages ./jbripper.py user pass spotify:user:[user]:playlist:7HC9PMdSbwGBBn3EVTaCNx

I'm still a Python noob!

@sokie
Copy link

sokie commented Aug 1, 2014

Hi!
What version of python are you using on this? 2.7?
I'm on debian 7.2 with python 2.7, I've installed everything.
When I try to run it, I get:
Loggin in!
Unable to connect to spotify
Logged out!
Is there a problem with pyspotify or am I missing something?
Tried running with python 3 on a fresh new VM debian 7.2, but I get syntax errors

@fr34kyn01535
Copy link

There must be a problem with using this code and latest pyspotify:

Traceback (most recent call last):
File "./jbripper.py", line 6, in
from jukebox import Jukebox, container_loaded
File "/home/spotify/jukebox.py", line 10, in
from spotify import ArtistBrowser, Link, ToplistBrowser, SpotifyError
ImportError: cannot import name ToplistBrowser

@theNailz
Copy link
Contributor Author

theNailz commented Aug 4, 2014

@fr34kyn01535 The latest pyspotify is incompatible. Install the v1.11 version:

sudo pip uninstall pyspotify
sudo pip install pyspotify==1.11

And try again.

@fr34kyn01535
Copy link

Works flawless on Ubuntu 14.04, thank you!

@theNailz
Copy link
Contributor Author

theNailz commented Aug 4, 2014

Latest build instructions for Debian 7.6 (wheezy) 3.2.60 x86_64:

sudo apt-get install python-pip python-dev lame build-essential libffi-dev unzip
wget https://developer.spotify.com/download/libspotify/libspotify-12.1.51-Linux-x86_64-release.tar.gz
tar vzxf libspotify-12.1.51-Linux-x86_64-release.tar.gz
cd libspotify-12.1.51-Linux-x86_64-release/
sudo make install prefix=/usr/local
cd ..
sudo pip install -U pyspotify==1.11 eyeD3
wget https://github.com/robbeofficial/spotifyripper/archive/master.zip
unzip master.zip
cd spotifyripper-master/
cp /HOME/USERNAME/spotify_appkey.key .
./jbripper.py

For other platforms or 32 bit, use the appropriate libspotify.

@sokie
Copy link

sokie commented Aug 4, 2014

Hi Nailz,
I've tried the latest build instructions on a clean debian install (32bit )
Everything installs correctly like before, but I still get
"Logging in, please wait...
Can not connect to spotify
Logged out!"
Strange...

@theNailz
Copy link
Contributor Author

theNailz commented Aug 4, 2014

Do the pyspotify examples give errors as well?

git clone --branch v1.x/master https://github.com/mopidy/pyspotify.git
cd pyspotify
cp /home/user/spotify_appkey.key .
python jukebox.py -u username -p password
jukebox> ls
<should display your playlists>

If this has problems too, it looks like something is wrong with pyspotify on your system, or the connection between you and Spotify is being rejected. (A firewall perhaps?)

@sokie
Copy link

sokie commented Aug 4, 2014

Thanks for the help nailz,
unfortunately that doesn't work either, but I'm presuming it's the firewall where I'm at.
I'll try it later from home.
EDIT: yeah it was actually my virtual machine. Since adapter was on NAT through my own adapter it wasn't reachable probably. Just switched to bridged mode and it was ok.
Thanks again

@MaxDout
Copy link

MaxDout commented Aug 17, 2014

I'm running OSX Mavericks and keep getting

Traceback (most recent call last):
  File "./jbripper.py", line 25, in <module>
    from jukebox import Jukebox, container_loaded
  File "/Users/spotifyripper/jukebox.py", line 10, in <module>
    from spotify import ArtistBrowser, Link, Playlist, ToplistBrowser, SpotifyError
ImportError: cannot import name ToplistBrowser

Any idea what's wrong?

@fr34kyn01535
Copy link

Yes, If you would just read the comments before ~

sudo pip uninstall pyspotify
sudo pip install pyspotify==1.11

@MaxDout
Copy link

MaxDout commented Aug 17, 2014

Thanks, although I'm still having issues. Here is what I am doing on OS X:

$ cd /Users/libspotify-12.1.51-Darwin-universal
$ sudo pip install -U pyspotify==1.11
$ sudo pip install eyeD3 --allow-external eyeD3 --allow-unverified eyeD3
$ cd /Users/spotifyripper
$ ./jbripper.py [username] [password] spotify:track:52xaypL0Kjzk0ngwv3oBPR

But this results in:

Traceback (most recent call last):
  File "./jbripper.py", line 24, in <module>
    from spotify import Link, Image
ImportError: No module named spotify

@theNailz
Copy link
Contributor Author

Check the 3rd and 4th comment in this issue.

@MaxDout
Copy link

MaxDout commented Sep 9, 2014

Check the 3rd and 4th comment in this issue.

Thanks @theNailz! But unfortunately that fix didn't do it.

I ran:

PYTHONPATH=/usr/local/lib/python2.7/site-packages ./jbripper.py [username] [password] spotify:track:52xaypL0Kjzk0ngwv3oBPR

But still got:

Traceback (most recent call last):
  File "./jbripper.py", line 24, in <module>
    from spotify import Link, Image
ImportError: No module named spotify

@droopified
Copy link

i get this error when trying to install it...

Install pyspotify-dev

wget https://github.com/mopidy/pyspotify/tarball/develop#egg=pyspotify-dev
tar vzxf develop

$ wget https://github.com/mopidy/pyspotify/tarball/develop#egg=pyspotify-dev
--2014-12-07 20:24:55-- https://github.com/mopidy/pyspotify/tarball/develop
Resolving github.com (github.com)... 192.30.252.128
Connecting to github.com (github.com)|192.30.252.128|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/mopidy/pyspotify/legacy.tar.gz/develop [following]
--2014-12-07 20:24:55-- https://codeload.github.com/mopidy/pyspotify/legacy.tar.gz/develop
Resolving codeload.github.com (codeload.github.com)... 192.30.252.146
Connecting to codeload.github.com (codeload.github.com)|192.30.252.146|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2014-12-07 20:24:56 ERROR 404: Not Found.

@Geogboe
Copy link

Geogboe commented Dec 14, 2014

Got it working for me by following theNailz instructions at the top but needed to change a few things.

My system: 
 - Ubuntu Server 12.04 x86
 - Managing remotely via SSH

-----------------------------------------------------
# Go home!
cd ~

# My addition: Make sure system is fully updated
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y

# Install libspotify
wget https://developer.spotify.com/download/libspotify/libspotify-12.1.51-Linux-i686-release.tar.gz
tar vzxf libspotify-12.1.51-Linux-i686-release.tar.gz
cd libspotify-12.1.51-Linux-i686-release/
sudo make install prefix=/usr/local
cd ..

# Fetch spotifyripper
wget https://github.com/robbeofficial/spotifyripper/archive/master.zip
unzip master.zip

# Worked for me !
--------------------------------
# Install pyspotify-dev 
wget https://github.com/mopidy/pyspotify/tarball/develop#egg=pyspotify-dev
tar vzxf develop

# THIS DID NOT WORK. The link is no longer available. I found instructions from source. https://pyspotify.mopidy.com/en/latest/installation/

sudo apt-get install build-essential python-dev python3-dev libffi-dev
sudo pip install pyspotify

--------------------------------
# Install mopidy apt source
wget -q -O - https://apt.mopidy.com/mopidy.gpg | sudo apt-key add -
sudo wget -q -O /etc/apt/sources.list.d/mopidy.list https://apt.mopidy.com/mopidy.list

# This worked for me!
----------------------------------------------
# Copy the jukebox dependency
cd spotifyripper-master/
cp ../mopidy-pyspotify-ef75737/examples/jukebox.py . # NO GO. I don't know what this is but it wasn't on my system. 
mv /YOUR/PATH/TO/spotify_appkey.key . # I just copied my key to ~/spotifyripper-master/
cd ..
-----------------------------------------------
# Install dependencies and tools: SEE NOTE BELOW
sudo apt-get update
sudo apt-get install mopidy python-spotify lame eyed3

# This may have already been done but I did it again anyway!

# Let it rip
cd spotifyripper-master/
screen ./jbripper.py <username> <password> <playlist|track> # What the hell is screen?? umm... I removed that. 

# THIS DOESN'T WORK. Another comment mentioned:
sudo pip uninstall pyspotify
sudo pip install pyspotify==1.11

# Also,
<username> <password> will EACH need to be surrounding by quotes. 

# AFTER doing this everything is now working perfectly. 

Hopes this helps someone. 

@droopified
Copy link

very nice ill follow that

@t0000
Copy link

t0000 commented Feb 7, 2015

what is the error?
http://pastebin.com/kVV3J9WY
thx

nicodeceulaer pushed a commit to nicodeceulaer/spotifyripper that referenced this issue Mar 25, 2015
Added link types album, artist and starred. Updated README.md. Set preferred bitrate to 320kps.
@Latent-code
Copy link

Getting this error when trying to run the command.. I am really not a pro, so any help appreciated!
im on a New macbook pro 10.10.3

./jbripper.py USER PASSWORD spotify:user:USER:playlist:1CbyNAS5iGcHA8EsQcszIE
Traceback (most recent call last):
File "./jbripper.py", line 6, in
from jukebox import Jukebox, container_loaded
File "/spotifyripper-master/jukebox.py", line 15, in
AudioSink = import_audio_sink()
File "/Library/Python/2.7/site-packages/spotify/audiosink/init.py", line 45, in import_audio_sink
raise ImportError, "\n".join(error_messages)
ImportError: Tried to use spotify.audiosink.alsa.AlsaSink as audio sink, but failed:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/spotify/audiosink/init.py", line 36, in import_audio_sink
module = import(module, fromlist=[cls])
File "/Library/Python/2.7/site-packages/spotify/audiosink/alsa.py", line 1, in
import alsaaudio
ImportError: No module named alsaaudio

Tried to use spotify.audiosink.oss.OssSink as audio sink, but failed:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/spotify/audiosink/init.py", line 36, in import_audio_sink
module = import(module, fromlist=[cls])
File "/Library/Python/2.7/site-packages/spotify/audiosink/oss.py", line 1, in
import ossaudiodev
ImportError: No module named ossaudiodev

Tried to use spotify.audiosink.portaudio.PortAudioSink as audio sink, but failed:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/spotify/audiosink/init.py", line 36, in import_audio_sink
module = import(module, fromlist=[cls])
File "/Library/Python/2.7/site-packages/spotify/audiosink/portaudio.py", line 1, in
import pyaudio
ImportError: No module named pyaudio

Tried to use spotify.audiosink.gstreamer.GstreamerSink as audio sink, but failed:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/spotify/audiosink/init.py", line 36, in import_audio_sink
module = import(module, fromlist=[cls])
File "/Library/Python/2.7/site-packages/spotify/audiosink/gstreamer.py", line 4, in
import gst
ImportError: No module named gst

Was not able to import any of the audio sinks

@julayjb
Copy link

julayjb commented Aug 21, 2015

Thanks to theNailz and Geogboe! I had to follow both instructions to finally get it working. Very Nice!

@hail0
Copy link

hail0 commented Mar 25, 2017

Hi,

I get the following error message while execute ./jbripper.py [username] [password] spotify:track:52xaypL0Kjzk0ngwv3oBPR

Traceback (most recent call last):
File "./jbripper.py", line 5, in
from spotify import Link, Image
ImportError: No module named spotify

Before I got the following error message trying to install sudo pip install pyspotify

Command /usr/bin/python -c "import setuptools, tokenize;file='/tmp/pip-build-RYaJST/pyspotify/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-ObV5Za-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-RYaJST/pyspotify
Storing debug log for failure in /root/.pip/pip.log

Can anyone help me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests