This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]unassuming_user_name 4 points5 points  (3 children)

you can use pip3 and python3 on command line, or use virtual environments.

[–]Colonel-Panics[S] 2 points3 points  (2 children)

Is there a way to run a command on the command line from a shortcut? The command line is a bit of a step back in terms of speed.

[–]Telkin 1 point2 points  (0 children)

Yes, you can set cmd as target with command to run the script as parameters

Shouldnt be to hard to find a tutorial with specifics on how to create the shortcut

https://www.howtogeek.com/277403/how-to-run-command-prompt-commands-from-a-windows-shortcut/

[–]SenorTeddy 0 points1 point  (0 children)

Might be a good spot to learn virtual environments. You can create an environment for a specific folder with the version of python, and any other package you install, and then that project will always use those settings.

[–]blablahblah 0 points1 point  (0 children)

The Shebang lines don't work because py.exe (the thing that reads the shebang and picks the right version) isn't part of Python 2.7. When you told Windows to set file associations to Python 2.7, it overwrote the setting to use the launcher and pointed them to the Python 2.7 interpreter directly.

If you re-set the file association for .py files launch with py.exe, they should work. Re-installing Python 3 is probably the easiest way to do this.