You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cat .tool-versions
# python 3.12.5
python --version
# Python 3.12.5cd project
cat .tool-versions
# python 3.10.10
python --version
# Python 3.10.10cd sub-project
cat .tool-versions
# python 2.73.0
python --version
# Python 2.73.0cd ..
cat .tool-versions
# python 3.10.10
python --version
# Python 3.10.10cd /
cat .tool-versions
cat: .tool-versions: No such file or directory
python --version
# I suspect vfox will incorrectly report "Python 3.10.10" when it should report what ever the system (dnf/apt/pkg) installed version
Mise also has this problem since it is env based.
Shims while they are a few milliseconds slower mean that they are accurate.
Another interesting problem with the PATH manipulation approach:
command_that_expects_to_use_python_three_ten() {
cd project/
# some python command that only works on 3.10 +
sleep 10
# some python command that only works on 3.10 +
sleep 10
# some python command that only works on 3.10 +
sleep 10
# some python command that only works on 3.10 +
sleep 10
}
command_that_expects_to_use_python_two_seven(){
cd project/sub_project/
# some python command that only works on python 2.7 - 2.9
sleep 10
# some python command that only works on python 2.7 - 2.9
sleep 10
}
# run them in parallel
command_that_expects_to_use_python_three_ten &
command_that_expects_to_use_python_two_seven &
this will fail because the second one will cause the PATH to point at the incorrect version of python
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
using this structure
Will this be true?
Mise also has this problem since it is env based.
Shims while they are a few milliseconds slower mean that they are accurate.
Another interesting problem with the PATH manipulation approach:
this will fail because the second one will cause the PATH to point at the incorrect version of python
Beta Was this translation helpful? Give feedback.
All reactions