-
-
Notifications
You must be signed in to change notification settings - Fork 625
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
xontrib unable to load modules installed with xpip on fedora 30 #3365
Comments
Thanks for reporting @skewballfox -- I don't have a Fedora install handy, but I'm not sure if we can mutate the paths that |
Not just an alias, it also adds Considering that it's trying to cover conda, venv/pipx, system installs, whatever homebrew does, pyenv, and who knows what else, I'm not surprised there's some oddness going on. If there was a reliable way of detecting xonsh is running under the "system" python environment, adding |
I think the "system" environment would be:
What doesn't count:
Special considerations:
|
I have the same issue on Fedora 31. The reason is that And it's not initialized due to This flag is read-only in Python, so it seems these are the only 2 ways to change it's value:
Could someone suggest why it's set to 1 in Xonsh? |
(Update) The In xonsh.spec you can see the line: pathfix.py -i "%{__python3} %{py3_shbang_opts}u" -p -n %{buildroot}%{_bindir}/xonsh And The same issue has been dealt with by Ansible ansible/ansible#62565. The details of the package and PoC can be found in packages/xonsh. Would you like me to propose the same fix to the package maintainer as Ansible did for it's Spec? |
Yes please do! |
this seems to still be an issue on fedora 32 |
for those who see this and just want a solution, add this to your config file before any xontribs are loaded:
|
I think I Have the same problem on Debian. First, I don't like the idea of embedding
Then, I install it with the
I have no clue why that went under And after that, I still run into the same problem
I want to install these modules but only as a user.
|
I think this might be related to #3636 |
I just put this here for the future tests: docker run --rm -it fedora /bin/bash \
-c "yum install -y pip && pip install xonsh && xonsh -c 'xpip install xontrib-hist-format && xontrib load hist_format && hist-format --help'" |
I can't repeat this issue now. |
xonfig
Issues with modules being loaded by xontrib via xpip
I suspect this is because fedora separates packages installed via
sudo pip
from system packages, and also has commands use system pythonchanging pythonpath to either the
$HOME/.local/lib/python3.7
or the/usr/local/lib/python3.7
doesn't seem to aleviate the issue (noteworthy was before assignment $PYTHONPATH didn't exist)I've managed to symlink the smaller files but modules like schedule or tab completers don't seem to cooperate with this
Expected Behavior
modules install via xpip work without symlinking or have some way to specify the install path of xontribs
Current Behavior
third party modules not included in the install will not work out of the box
Steps to Reproduce
on fedora 30
I believe this is isolated to fedora given it's likely related to how they seperate packages installed via
sudo pip
from those installed bysudo dnf install python3-...
and provide a separate python command for system packages, perhaps wrapping all the extra modules into either one or a series of copr's would work, or just allowing some way to specify the path that xontrib searches allowing for xontribs to be installed viapip install --user
.For community
⬇️ Please click the 👍 reaction instead of leaving a
+1
or 👍 commentThe text was updated successfully, but these errors were encountered: