This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author bluebird
Recipients bluebird, paul.moore, steve.dower, tim.golden, zach.ware
Date 2019-12-11.11:30:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1576063856.43.0.431001018192.issue39025@roundup.psfhosted.org>
In-reply-to
Content
The py Python launcher is a great improvement over a few years ago when managing multiple Python installation was tedious.

However, it does not solve one annoying problem: the Scripts directory. If you install tools like mypy, pyqt-tools or pyinstaller, to be able to use them, you need to have the Scripts directory in your PATH variable. And if you have multiple Python installations, you are back to square 1 where you have to explicitely modify your PATH according to the version of Python where the tools have been installed.

To give a practical example, at work, I have Python 3.1 because some of our software are distributed as .pyc for this version of Python, Python 3.5 for the same reason and Python 3.7 for all the developments which do not incur the previous dependencies.

The default environement with Python and Python\Scripts added to the path is Python 3.5 . However, for all PyQt developments, I use Python 3.7 . I launch my program with py -3.7 myfancygui.py  but when I want to access some of the pyqt tools like pyuic5, I need to explicitely add Python3.7\Scripts to my PATH.

The technical solution is not clear to me, but it would be nice to duplicate the benefits of the py launcher to the Scripts directory.

Some random propositions:

1. Create a pyscript launcher, which would work like py but would take as command-line the name of the script to run:

    pyscript -3.7 pyuic5

2. Let py execute a command-line with proper environment for that specific version of python:

   > py -env-3.7
   Environment adjusted for Python 3.7
   > pyuic5 ... works fine
   > exit
   Back to default environement

There are probably other stratagic ways to reach the same result.
History
Date User Action Args
2019-12-11 11:30:56bluebirdsetrecipients: + bluebird, paul.moore, tim.golden, zach.ware, steve.dower
2019-12-11 11:30:56bluebirdsetmessageid: <1576063856.43.0.431001018192.issue39025@roundup.psfhosted.org>
2019-12-11 11:30:56bluebirdlinkissue39025 messages
2019-12-11 11:30:55bluebirdcreate