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

Cannot install on Arch Linux (Python 3.7+) #32

Closed
Quoteme opened this issue Dec 29, 2018 · 12 comments
Closed

Cannot install on Arch Linux (Python 3.7+) #32

Quoteme opened this issue Dec 29, 2018 · 12 comments
Labels

Comments

@Quoteme
Copy link

Quoteme commented Dec 29, 2018

I tried again and again. I even installed python-dbus, as suggested in the readme.md. But I keep getting this error:

 > pip install spotify-cli-linux --user
Collecting spotify-cli-linux
  Using cached https://files.pythonhosted.org/packages/97/50/9bcf63c522816031be72b7f9a03eabe383f0dd00e0e613461dd89fdb58c8/spotify-cli-linux-1.2.3.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-vuqnp9nu/spotify-cli-linux/setup.py", line 3, in <module>
        from spotifycli.spotifycli import __doc__
      File "/tmp/pip-install-vuqnp9nu/spotify-cli-linux/spotifycli/spotifycli.py", line 9, in <module>
        from version import __version__
    ModuleNotFoundError: No module named 'version'

pip list gives me this list:

1 > pip list
Package      Version         
------------ ----------------
appdirs      1.4.3           
btrfsutil    1.1.0           
CacheControl 0.12.5          
cffi         1.11.5          
chardet      3.0.4           
colorama     0.4.1           
distlib      0.2.8           
distro       1.3.0           
greenlet     0.4.15          
html5lib     1.0.1           
idna         2.8             
lensfun      0.3.2           
lockfile     0.12.2          
lxml         4.2.5           
msgpack      0.5.6           
numpy        1.15.4          
packaging    18.0            
pep517       0.3             
Pillow       5.3.0           
pip          18.1            
progress     1.4             
pycparser    2.19            
PyGObject    3.30.4          
pynvim       0.3.1           
pyparsing    2.3.0           
pytoml       0.1.20          
pywal        3.2.1           
Reflector    2018.3.3.22.1.34
requests     2.20.1          
retrying     1.3.3           
setuptools   40.6.3          
six          1.12.0          
team         1.0             
urllib3      1.24.1          
webencodings 0.5.1           
youtube-dl   2018.12.17
@pwittchen
Copy link
Owner

pwittchen commented Dec 29, 2018 via email

@rhodium45
Copy link

Same error on my machine. I use Python 3.7 and pip 18.1.

@pwittchen
Copy link
Owner

pwittchen commented Dec 30, 2018 via email

@pwittchen
Copy link
Owner

pwittchen commented Jan 2, 2019

This may be the solution for this problem: https://stackoverflow.com/questions/32423793/importerror-no-module-named-version. Link to another reference: dyve/django-bootstrap-toolkit#71.

I'll check it during the day and possibly release next version with the fix.

@pwittchen
Copy link
Owner

It's strange, when I changed:

from version import __version__

to:

from .version import __version__

like in suggested threads, then it didn't work on my machine with Ubuntu and I got the same errors as you.

@pwittchen
Copy link
Owner

@Quoteme @rhodium45:

Please try to install this package in the following, alternative way:

git clone https://github.com/pwittchen/spotify-cli-linux.git
cd spotify-cli-linux/
pip install -e .

I hope it helps.

@45ninjas
Copy link

45ninjas commented Jan 3, 2019

I had the same issue.
Editing line 9 from
from version import __version__
to
from .version import __version__

resolved the issue for me. Using Python 3.7.1 on Arch

@pwittchen
Copy link
Owner

Ok, I was able to reproduce this issue on my machine. It's related to Python version - not Arch. Since Python 3.7 notation without a dot during the import is invalid in this case. I just need to find a way to make this script working on all Python versions or create separate releases for different versions.

@pwittchen pwittchen changed the title Cannot install on Arch Linux Cannot install on Arch Linux (Python 3.7+) Jan 5, 2019
@pwittchen
Copy link
Owner

pwittchen commented Jan 5, 2019

It should be fixed in the latest release: 1.2.4.
Please upgrade your version with: pip install spotify-cli-linux --upgrade
In case, you still have this problem, we can re-open this issue or create a new one.

@hsantanna
Copy link

Now it can be installed, but won't run because spotifycli/spotifycli.py line 63, does:

command = raw_input('spotify > ')

NameError: name 'raw_input' is not defined

That's because raw_input is python2 and won't work with python3.

@pwittchen pwittchen reopened this Feb 7, 2019
@pwittchen
Copy link
Owner

@hsantanna Thanks for reporting this. I'll have a look at it.

@pwittchen pwittchen added the bug label Feb 7, 2019
@pwittchen
Copy link
Owner

pwittchen commented Feb 7, 2019

It's strange, because it worked fine for me on both Python versions. Nevertheless, I've added fix here: cf8df53. You can upgrade script and tell me if the problem still occurs.

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

No branches or pull requests

5 participants