In order to specify which version of python the Linux shell should use the first line of Python scripts can be a shebang line, which starts with #!:
#!/usr/bin/python
If you are in a virtual environment, then python myscript.py will use the Python from your virtual environment, but ./myscript.py...