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

python set by -P flag is not used/overwritten (in sixdb.sh and run_six.sh) #69

Open
JoschD opened this issue Oct 15, 2020 · 1 comment

Comments

@JoschD
Copy link

JoschD commented Oct 15, 2020

calling sixdb.sh with the -P flag to set a python does this, but overrides it immediately after.

$ /afs/cern.ch/project/sixtrack/SixDesk_utilities/pro/utilities/bash/sixdb.sh -P python3 . load_dir
Wed 14/10/20 19:59:47  sixdb.sh Setting python to python3 in PATH env var
Wed 14/10/20 19:59:47  sixdb.sh Python set to: /usr/bin/python - version: Python 2.7.5 

This is especially bad as sixdb (python in utilities/externals/SixDeskDB/) requires now python3 (it doesn't check for it yet, but the code raises a syntax error in python .) see SixTrack/SixDeskDB#37
making sixdb.sh unusable at the moment.

@JoschD JoschD changed the title sixdb.sh: -P flag overwritten sixdb.sh: python set by -P flag is not used/overwritten Oct 15, 2020
@JoschD
Copy link
Author

JoschD commented Feb 17, 2021

Related:
/afs/cern.ch/project/sixtrack/SixDesk_utilities/pro/utilities/bash/run_six.sh -a -P /afs/cern.ch/eng/sl/lintrack/miniconda2/bin/python

Does not seem to work either. Instead, the python on the system or currently sourced environment is used.

e.g. when python is not available (e.g. Ubuntu 20.04)

run_six.sh Python set to:  - version: /afs/cern.ch/project/sixtrack/SixDesk_utilities/pro/utilities/bash/dot_profile: line 806: python: command not found
(...)
 python version too new: found
 please use at most 3 (excluded)

or in a python3 sourced environment

run_six.sh Python set to: /home/jdilly/Software/venvs/pylhc_as_external/bin/python - version: Python 3.7.8
(...)
python version too new: 3.7.8
please use at most 3 (excluded)

Edit: I misunderstood the -P. It only wants the path to the bin directory.

$ /afs/cern.ch/project/sixtrack/SixDesk_utilities/pro/utilities/bash/run_six.sh -a -P /afs/cern.ch/eng/sl/lintrack/miniconda2/bin/
Python set to: /afs/cern.ch/eng/sl/lintrack/miniconda2/bin/python - version: Python 2.7.16 :: Anaconda, Inc.
python version too new: Inc.
please use at most 3 (excluded)

@JoschD JoschD changed the title sixdb.sh: python set by -P flag is not used/overwritten python set by -P flag is not used/overwritten (in sixdb.sh and run_six.sh) Feb 17, 2021
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