Quantcast
Channel: openSUSE Forums
Viewing all articles
Browse latest Browse all 40713

TUMBLEWEED problem installing python package via setup.py --user

$
0
0
I'm running into an issue installing a specific python package (https://github.com/pazz/alot/) from source using python3 setup.py install --user. The package depends on gpg and gpgme but somehow setuptools does pick up system packages installed in /usr/lib64/python3.8/site-packages. So if I run the above script it tries to install python3-gpg from pypi into ~/.local/lib/python3.8/site-packages/ (which I don't want because I have the system one installed). If I uninstall the the gpg package in $HOME starting alot fails with

Code:

Traceback (most recent call last): 
File "/home/jschrod/.local/bin/alot", line 6, in     
  from pkg_resources import load_entry_point
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3252, in     
  def _initialize_master_working_set(): 
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3235, in _call_aside   
  f(*args, **kwargs) 
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3264, in _initialize_master_working_set   
  working_set = WorkingSet._build_master() 
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 583, in _build_master   
  ws.require(__requires__) 
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 900, in require   
  needed = self.resolve(parse_requirements(requirements)) 
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 786, in resolve   
  raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'gpg' distribution was not found and is required by alot

Otherwise I have no problems importing gpg via python e.g.
Code:

python3 -m "import gpg"
returns without errors

I suspect this is somehow related to the issue discussed here: https://bugs.python.org/issue1294959 but I don't have any solution except for maybe adding /usr/lib64/python3.8/site-packages to my PYTHONPATH

Viewing all articles
Browse latest Browse all 40713

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>