Comment 2 for bug 1813232

Revision history for this message
Ian Wienand (iwienand) wrote :

With the fix, there is another problem now:

---
$ semanage
Traceback (most recent call last):
  File "/usr/sbin/semanage", line 28, in <module>
    import seobject
  File "/usr/lib/python3.7/site-packages/seobject.py", line 34, in <module>
    import sepolicy
  File "/usr/lib/python3.7/site-packages/sepolicy/__init__.py", line 9, in <module>
    import setools
  File "/usr/lib64/python3.7/site-packages/setools/__init__.py", line 24, in <module>
    __version__ = pkg_resources.get_distribution("setools").version
AttributeError: module 'pkg_resources' has no attribute 'get_distribution'
---

this seems to be related to https://bugzilla.redhat.com/show_bug.cgi?id=1550368#c21

---
The problem seems to stem from the fact that python3's pip is set to install only to the `/usr/local/lib/` prefix, but if it encounters an older version in `/usr/lib/` it will happily remove it. The result is that programs that run in isolated environment (that don't see into `/usr/local/lib/`) can't find setuptools and crash.
---