-
Notifications
You must be signed in to change notification settings - Fork 172
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
python-modules: use venv to install environment (O2-1089) #2034
Conversation
@aphecetche @miranov25 we discussed this at some point, IIRC. |
@ktf will try to give it a try next week, but a question right now : if there's already a virtualenv defined, why not using it simply and installing the modules in that one instead of defining a custom PYTHON_MODULES_INSTALLROOT ? |
@aphecetche I thought about it, the reason why I set up another virtual env with a copy of the packages of the previous one is that this way if people forget to do "bin/activate", they still get a self contained |
Also this follows the mantra "Do not break user installation, do not assume user has a special python environment (apart from python3)". If I were to use a prexisting virtualenv, it would install extra packages in it which might have counter indications. |
Hello Giulio. Thanks for modification. I had day of full meeting - I did not spot the pull request. For the 2 options discussed above I'm also in favour of user defining virtuaalenv.
I would like to be able to switch between the virtual env to test new functionatly (install experimental packages). Will it be supported in your schema? I will check how it it done, but I assume in copy version it will be more tricky to achieve that ... Marian. |
seems to work in my centos7 system with my favourite flag --always-prefer-system, but on second thought maybe i should not have used it? |
@mkrzewic I think that's fine, because python-modules is never picked up from the system. Did you |
@ktf now I did, then tried to run aliDoctor: |
What about e.g. "import tensorflow"? |
@ktf: same: |
@miranov25 in order to switch between virtualenvs you will have to rebuild. |
Now that we can rely on python3, we can simply setup our modules in a virtualenv environment, with the added advantage that we can pick up whatever is already available from the system or any previously setup virtualenv, allowing people to easily customize their Python-modules environment.
@marcovanleeuwen can you try now? |
@marcovanleeuwen can you try again? I think this might fix your |
@ktf with latest alidist + venv merged: DEBUG:O2:Python-modules:0: /home/mkrzewic/alisw/sw/SPECS/slc7_x86-64/Python-modules/1.0-5/Python-modules.sh: /home/mkrzewic/alisw/sw/INSTALLROOT/d780b9e7e2712302a8a0e3695e6d30805d3491c9/slc7_x86-64/Python-modules/1.0-5/share/python-modules/bin/pip3: /home/mkrzewic/alisw/sw/INSTALLROOT/d780b9e7e2712302a8a0e3695e6d30805d3491c9/s: bad interpreter: No such file or directory |
Hello Giulio (all), I come here with the AliGenerators perspective, i.e. adding some extra entropy. I ran the command : aliBuild deps AliGenerators --outgraph Deps-AliGenerators.pdf
In turn, this means that some other packages do depend indirectly to Python rather than Python-modules, that are :
Is there any preferred way to create the dependencies to Python, direct or indirect via Python-modules ? (I am still facing Python issues, at least to have Rivet running under my Kubuntu 18.04 with python3.6 available on the system but python2.7 being default.) |
I would depend directly on Python (or Python-system, on mac) as much as possible. Depending on |
Dear all. We need urgently some fox for the virtual environment. Can we help with testing? Marian |
I'd also like to see some progress on this one. The setup I was using (define a virtual env where I install alibuild and activate when -and only when- I'm working on Alice stuff) and that was working fine with the existing Python-modules-* recipes has recently hit a snag. Seems recent pip (>=20 ?) now refuses by default the --user option, in which case the Python-modules build fails with :
For the time being I "solved" it using a quick and dirty hack of two recipes : python-modules.sh xjalienfs.sh (see diffs here), and pre-installing Cython 0.29.16 in my dev virtual env. |
I'm also stuck here. I'm not able to rerun aliBuild anymore. |
In meantime I merged @aphecetche "way around sollution" to my branch, but on the next failure I will declare it blocker production tests |
I am back at this. If people could try it out and let me know their milage, I think we can merge this now. |
@ktf just tried a
|
Ok, great. Anyone else has troubles? Otherwise I guess we can merge this and fix the bugs later on. 9 tests are green, after all... |
Might not be related to this PR (it's been a while I did not test to run a full ctest), but I note that some tests are failing in my setup :
|
Now that we can rely on python3, we can simply setup our modules in a virtualenv environment, with the added advantage that we can pick up whatever is already available from the system or any previously setup virtualenv, allowing people to easily customize their Python-modules environment.
Now that we can rely on python3, we can simply setup our modules in a
virtualenv environment, with the added advantage that we can pick up whatever
is already available from the system or any previously setup virtualenv,
allowing people to easily customize their Python-modules environment.