Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upqvm-features-request in archlinux template uses environment to locate python/cannot always locate qubesdb module #4027
Comments
andrewdavidwong
added
bug
C: Arch Linux
labels
Jun 21, 2018
andrewdavidwong
added this to the Release 4.0 updates milestone
Jun 21, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Jun 21, 2018
Member
This fix is simple. The first line of qubes-features-request relies on /usr/bin/env to locate python:
#!/usr/bin/env python2
It should be changed to:
#!/usr/bin/python2
While I agree with the change, not really sure if that would help. In both cases it's python2 and the error message isn't about missing python binary, but python module. Do you have alternative python2 in that VM (manual build or sth)?
While I agree with the change, not really sure if that would help. In both cases it's |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
bx
Jun 21, 2018
Yes, I have a few VMs I use as development environments where have a pyenv setup to override the system-wide python environment. In such cases, the python modules installed along with /usr/bin/python2 do not get searched/loaded.
bx
commented
Jun 21, 2018
|
Yes, I have a few VMs I use as development environments where have a pyenv setup to override the system-wide python environment. In such cases, the python modules installed along with /usr/bin/python2 do not get searched/loaded. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ptitdoc
Jul 19, 2018
For python virtualenv you often have to initialise your environment with --system-site-packages if you want to inherit existing system packages. If not used you ends up with an isolated python environment with à minimal set of python modules.
In consequence when you run python, your virtualenv python is started which is linked to this few set of modules.
ptitdoc
commented
Jul 19, 2018
•
|
For python virtualenv you often have to initialise your environment with --system-site-packages if you want to inherit existing system packages. If not used you ends up with an isolated python environment with à minimal set of python modules. In consequence when you run python, your virtualenv python is started which is linked to this few set of modules. |
bx commentedJun 20, 2018
Qubes OS version:
R4.0
Affected component(s):
/usr/bin/qubes-features-requestin archlinux template-based VMsSteps to reproduce the behavior:
pyenv) that does not depend on any of the system-defined python modulesqvm-features-requestExpected behavior:
qvm-features-requestquietly succeedsActual behavior:
qvm-features-requestfails to importqubesdbmoduleGeneral notes:
This fix is simple. The first line of
qubes-features-requestrelies on/usr/bin/envto locate python:#!/usr/bin/env python2It should be changed to:
#!/usr/bin/python2Related issues:
From what I can tell, this is the only qubes-related tool included in the archlinux template that has this problem.
A quick look at scripts in
/usr/binwith qubes or qvm in its name shows that the other python-based tools explicitly set/usr/bin/python2as their interpreter