---
$ 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'
---
---
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.
---
With the fix, there is another problem now:
--- semanage" , line 28, in <module> python3. 7/site- packages/ seobject. py", line 34, in <module> python3. 7/site- packages/ sepolicy/ __init_ _.py", line 9, in <module> python3. 7/site- packages/ setools/ __init_ _.py", line 24, in <module> get_distributio n("setools" ).version
$ semanage
Traceback (most recent call last):
File "/usr/sbin/
import seobject
File "/usr/lib/
import sepolicy
File "/usr/lib/
import setools
File "/usr/lib64/
__version__ = pkg_resources.
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.
---