New submission from Bluebird <[email protected]>:
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.
----------
components: Windows
messages: 358256
nosy: bluebird, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Windows Python Launcher does not update PATH to Scripts directory
type: enhancement
versions: Python 3.7
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue39025>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com