cfangmeier / tuijam

A fancy TUI client for Google Play Music
MIT License
129 stars 9 forks source link

Error while installing: No such directory tuijam/lang #56

Closed trsdln closed 4 years ago

trsdln commented 4 years ago

While installing using command pip install --user --upgrade tuijam I'm getting next error:

    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-scub5q6u/tuijam/setup.py'"'"'; __file__='"'"'/tmp/pip-install-scub5q6u/tuijam/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-63e4sqw2/install-record.txt --single-version-externally-managed --compile --user --prefix=
         cwd: /tmp/pip-install-scub5q6u/tuijam/
    Complete output (4 lines):
    WARNING: The wheel package is not available.
    WARNING: The wheel package is not available.
    running install
    error: [Errno 2] No such file or directory: 'tuijam/lang'
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-scub5q6u/tuijam/setup.py'"'"'; __file__='"'"'/tmp/pip-install-scub5q6u/tuijam/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-63e4sqw2/install-record.txt --single-version-externally-managed --compile --user --prefix= Check the logs for full command output.

Archlinux/Python 3.8.1

cfangmeier commented 4 years ago

Hi @trsdln . Can you try doing a pip uninstall tuijam and then try reinstalling? The missing tuijam/lang directory hints to me that this might be an issue due to upgrading from a pre-localisation version to the current one.

Also, since you are on Arch, I encourage you to install using the AUR package so you get automatic updates.

trsdln commented 4 years ago

@cfangmeier yeah, I already tried to reinstall via pip and getting same error. Also, I was using AUR package in the past, but it broke after one of updates, so I switched to pip package. However, installation of AUR package went successfully, so I will stick with that one. Problem solved.

By the way, tuijam is great program. Thank you!

nathanshelly commented 4 years ago

@cfangmeier 👋 new user to tuijam, excited to try it out but also running into this issue when I try to install via pip install --user tuijam on macOS Catalina.

I've run the extra dependency steps mentioned in #53, here's the erroring output on the minimal commands to repro on my machine:

$ brew install gobject-introspection libffi mpv
$ PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig" pip install --user tuijam
Collecting tuijam
  Using cached tuijam-0.7.1.tar.gz (24 kB)
... # collecting various deps, cut for brevity
Building wheels for collected packages: PyGObject
  Building wheel for PyGObject (PEP 517) ... done
  Created wheel for PyGObject: filename=PyGObject-3.36.0-cp37-cp37m-macosx_10_14_x86_64.whl size=239905 sha256=28af78a0dc1786e030720735352ab4ef972f2ff2f01819cb0fab398737e3d35b
  Stored in directory: /Users/nathanshelly/Library/Caches/pip/wheels/2d/ae/21/b3f0b37b13dc25defc57fa194e4817bb9cbfbfb247dccaf8c0
Successfully built PyGObject
Installing collected packages: pyasn1, rsa, idna, urllib3, certifi, chardet, requests, validictory, decorator, mutagen, python-dateutil, proboscis, protobuf, httplib2, pyasn1-modules, oauth2client, mock, pycryptodomex, gpsoauth, soupsieve, beautifulsoup4, lxml, MechanicalSoup, future, gmusicapi, urwid, pyYAML, python-mpv, pycairo, PyGObject, pydbus, cachetools, google-auth, google-auth-httplib2, uritemplate, googleapis-common-protos, pytz, google-api-core, google-api-python-client, tuijam
    Running setup.py install for proboscis ... done
    Running setup.py install for gpsoauth ... done
    Running setup.py install for gmusicapi ... done
    Running setup.py install for urwid ... done
    Running setup.py install for python-mpv ... done
    Running setup.py install for pycairo ... done
    Running setup.py install for googleapis-common-protos ... done
    Running setup.py install for tuijam ... error
        ERROR: Command errored out with exit status 1:
     command: /Users/nathanshelly/.asdf/installs/python/3.7.5/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/dl/hcb4rf2s1pb3s2rqq3w326jc0000gn/T/pip-install-y8a_7zyx/tuijam/setup.py'"'"'; __file__='"'"'/private/var/folders/dl/hcb4rf2s1pb3s2rqq3w326jc0000gn/T/pip-install-y8a_7zyx/tuijam/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/dl/hcb4rf2s1pb3s2rqq3w326jc0000gn/T/pip-record-mp8dwmwf/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /Users/nathanshelly/.local/include/python3.7m/tuijam
         cwd: /private/var/folders/dl/hcb4rf2s1pb3s2rqq3w326jc0000gn/T/pip-install-y8a_7zyx/tuijam/
    Complete output (2 lines):
    running install
    error: [Errno 2] No such file or directory: 'tuijam/lang'
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/nathanshelly/.asdf/installs/python/3.7.5/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/dl/hcb4rf2s1pb3s2rqq3w326jc0000gn/T/pip-install-y8a_7zyx/tuijam/setup.py'"'"'; __file__='"'"'/private/var/folders/dl/hcb4rf2s1pb3s2rqq3w326jc0000gn/T/pip-install-y8a_7zyx/tuijam/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/dl/hcb4rf2s1pb3s2rqq3w326jc0000gn/T/pip-record-mp8dwmwf/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /Users/nathanshelly/.local/include/python3.7m/tuijam Check the logs for full command output.

Running pip uninstall tuijam gives the following output - WARNING: Skipping tuijam as it is not installed. - as this is the first time I'm installing it.

cfangmeier commented 4 years ago

Hi @nathanshelly . Thanks for reporting this. My best guess is that there is some issue with how the localization files get installed on OSX, hence the missing directory. Localization was implemented by @t1meshift. maybe he has some ideas for how to fix this problem?

t1meshift commented 4 years ago

How strange. I'm not sure if the package in pip contains lang folder.

I'll take a look on it.

nathanshelly commented 4 years ago

So I tried to install from source and I ran into a different problem (happy to open a separate issue if you'd prefer to keep them distinct). Any chance either of you know how to fix it?

❯ tuijam
starting up.
Traceback (most recent call last):
  File "/Users/nathanshelly/.local/bin/tuijam", line 11, in <module>
    load_entry_point('tuijam==0.7.1', 'console_scripts', 'tuijam')()
  File "/Users/nathanshelly/.local/lib/python3.7/site-packages/tuijam/app.py", line 628, in main
    app = App()
  File "/Users/nathanshelly/.local/lib/python3.7/site-packages/tuijam/app.py", line 32, in __init__
    import mpv
  File "/Users/nathanshelly/.local/lib/python3.7/site-packages/mpv.py", line 48, in <module>
    raise OSError("Cannot find libmpv in the usual places. Depending on your distro, you may try installing an "
OSError: Cannot find libmpv in the usual places. Depending on your distro, you may try installing an mpv-devel or mpv-libs package. If you have libmpv around but this script can't find it, consult the documentation for ctypes.util.find_library which this script uses to look up the library filename.

I tried installing mpv as this issue suggested might help but it didn't seem to change anything.

cfangmeier commented 4 years ago

Hi @nathanshelly. Can you find out where libmpv.dylib is currently installed in your system? The error makes it seem like it's installed in some unorthodox place. For reference, this shows a few places where it should be looking.

nathanshelly commented 4 years ago

Hi @cfangmeier thanks for the help! Found libmpv.dylib in Homebrew's under Celler directory, had to manually symlink it to /usr/local/lib/ (which weirdly I didn't have to do when I tried building from source on a separate laptop):

ln -s /usr/local/Cellar/mpv/0.32.0/lib/libmpv.dylib /usr/local/lib/libmpv.dylib

Successfully launched and authenticated. Super excited to be able to use GPM from my terminal, thanks for making this!