LazoCoder / Pokemon-Terminal

Pokemon terminal themes.
GNU General Public License v3.0
4.2k stars 225 forks source link

Command does not work through pip --user install on Fedora 30 #175

Closed Saroufim closed 5 years ago

Saroufim commented 5 years ago

Installing through pip --user makes the script fail.

Traceback:

Traceback (most recent call last):
  File "/home/User/.local/bin/ichooseyou", line 11, in <module>
    load_entry_point('pokemon-terminal==1.2.0', 'console_scripts', 'ichooseyou')()
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2793, in load_entry_point
    return ep.load()
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2411, in load
    return self.resolve()
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2417, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
ModuleNotFoundError: No module named 'pokemonterminal'

It seems that the script looks for site-packages in the root directory while the installation was in the user directory hence it's unable to launch the program.

jimmyorourke commented 5 years ago

hmm I'm not able to reproduce (note I'm not on fedora, and still on python3.6).

Can you show the exact steps you took to install up until failure along with the outputs, as well as a ls showing the package made it into your user site

Saroufim commented 5 years ago

The command I used to install it is: pip3 install --user git+https://github.com/LazoCoder/Pokemon-Terminal.git ls output: cd ~/.local/lib/python3.7/site-packages ls

astral-1.10.1.dist-info           pytz
astral.py                         pytz-2018.9.dist-info
easy-install.pth                  schedule
pokemon_terminal-1.2.0-py3.7.egg  schedule-0.6.0.dist-info
protontricks                      site.py
protontricks-1.2-py3.7.egg-info   tzlocal
psutil                            tzlocal-1.5.1-py3.7.egg-info
psutil-5.5.1-py3.7.egg-info       vdf
__pycache__                       vdf-3.0.dist-info

cd /usr/lib/python3.7/site-packages/ ls

chardet                                  pyfros
chardet-3.0.4-py3.7.egg-info             PySocks-1.6.8-py3.7.egg-info
chrome_gnome_shell-0.0.0-py3.7.egg-info  pyxdg-0.26-py3.7.egg-info
cupshelpers                              requests
cupshelpers-1.0-py3.7.egg-info           requests-2.21.0-py3.7.egg-info
decorator-4.3.0-py3.7.egg-info           seobject.py
decorator.py                             sepolgen
distro-1.4.0-py3.7.egg-info              sepolicy
distro.py                                sepolicy-1.1-py3.7.egg-info
easy_install.py                          setuptools
enchant                                  setuptools-40.8.0.dist-info
firewall                                 six-1.12.0.dist-info
fros-1.1-py3.7.egg-info                  six.py
gtweak                                   slip
idna                                     slip-0.6.4-py3.7.egg-info
idna-2.7-py3.7.egg-info                  slip.dbus-0.6.4-py3.7.egg-info
olefile                                  sockshandler.py
olefile-0.46-py3.7.egg-info              socks.py
pip                                      sos
pip-19.0.3.dist-info                     sos-3.7-py3.7.egg-info
pkg_resources                            urllib3
__pycache__                              urllib3-1.24.3-py3.7.egg-info
pyenchant-2.0.0-py3.7.egg-info           xdg

I had the same problem when trying to install it via distutils. It's also worth noting that I tried this on both Fedora 30 Workstation and Fedora 30 Silverblue with the same results.

jimmyorourke commented 5 years ago

hmm what looks suspicious is that you only have pokemon_terminal-1.2.0-py3.7.egg, and not the extracted folders, which you do have for your other packages. I haven't seen this before.

And probably a dumb question since you seem to have other user packages installed, but you user site is in your PATH, correct?

Other potential things to try (not sure if these are useful, but would be some things I would personally try): uninstall the package and make sure it's gone, update pip and try again, and also try with python3.7 -m pip.

And if you have anything set up with a distro other than Fedora30 and can give it a shot.

Saroufim commented 5 years ago

deleting everything and reinstalling it all throughpython3.7 -m pip nstall --user git+https://github.com/LazoCoder/Pokemon-Terminal.git worked. Thanks!