I'm using a project which is calling a script where python
means python3. However python -V shows version 2. I know I have both versions (python3 -V, shows expected version) installed.
How can I run a script from this project and it run the correct version of Python? I suspect I shouldn't have to change anything like aliases or environment paths. Although I haven't used them before, this sounds exactly like what a virtual env is for. Am I correct?
ETA:
I'm calling a script from the command line:
make foobar
Set your desired Python version on the IDE and create a virtualenv if especiall the project requires certain packages/libraries to keep it isolated and not run into certain errors down the road.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.