Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python & Windows: Where is the python launcher?

Tags:

I'm trying to use different versions of python on win7, and I was told that I can use the python laucher.

I find the docs for it: https://docs.python.org/3/using/windows.html#launcher But I don't know where is it. Someone say its called py.exe, but there is no file with this name on my computer.

I installed python 3.4.3 with Anaconda, https://store.continuum.io/cshop/anaconda/, comes with Scipy

===========

UPDATE: Since there is no python launcer in Anacoda, how can I re-install it? Or if there is better way of using different version on Win7?

like image 642
cqcn1991 Avatar asked Jun 12 '15 02:06

cqcn1991


2 Answers

It should be in the root directory of Python 3.3 installs and higher. It is not available for Python2.

Go to C:\PythonXX\ and you should find py.exe for your version.

In Command Prompt or your favorite shell (like Cygwin), run:

py -3.3 -m path/to/myscript.py 

However, this only works if you have a 3.3 or higher installed.

EDIT: Anaconda does not come with Python launcher. It is only available for an ActiveState, standard, or probably many other installs.

EDIT2: Here are two brand-new, Python 3.4 installs of ActiveState Python and Anaconda Python, screenshotted. Notice how Anaconda Python does not include py.exe and a lot of other (non-essential) executables?

Anaconda InstallActiveState Install

EDIT3: After some "difficult" testing, just set anaconda as your default install for Python3.4 and grab the py.exe from another install. That is all. So you can install Python3.4 from another source, uninstall it, and save the py.exe, make sure it is in the system path, and the python launcher is fully installed.

EDIT4: Actually there's also a standalone installer available here: https://bitbucket.org/vinay.sajip/pylauncher/downloads

like image 136
Alexander Huszagh Avatar answered Oct 11 '22 05:10

Alexander Huszagh


If installing python from python.org's downloads and you select "[x] install pylauncher [x] install for all users", py.exe is installed in C:\Windows\py.exe.

I think if you don't install for all users, then it's in the python install root.

If you are able to run py from cmd.exe, then you can find out where it is with where py.exe.

like image 38
idbrii Avatar answered Oct 11 '22 06:10

idbrii