Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

library name collision: xattr and pyxattr = import xattr? #49

Open
pjotrek-b opened this issue Jul 12, 2024 · 0 comments
Open

library name collision: xattr and pyxattr = import xattr? #49

pjotrek-b opened this issue Jul 12, 2024 · 0 comments

Comments

@pjotrek-b
Copy link

xattr and pyxattr both import as xattr... 😕

I'm using pyxattr as module in my code, but in order to do so, I need to pip uninstall xattr first - which then breaks the xattr command (OS: Xubuntu 20.04)
😢

Is there a way to have both pip packages installed, but import them differently?
I was honestly surprised that I install "pyxattr" and then not just simply import "pyxattr" 😉

Grateful for any advice!

(Here's a copy of the error message the broken xattr throws after making place for pyxattr, in case someone searches for it:)

Traceback (most recent call last):
File "/usr/bin/xattr", line 11, in
load_entry_point('xattr==0.9.6', 'console_scripts', 'xattr')()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 490, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2854, in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2445, in load
return self.resolve()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2451, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
ModuleNotFoundError: No module named 'xattr.tool'; 'xattr' is not a package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant