mirror of
https://github.com/python/cpython.git
synced 2025-07-16 07:45:20 +00:00

This was done so as to move users to `python3 -m venv` which prevents confusion over which Python interpreter will be used in the virtual environment when more than one is installed.
17 lines
444 B
Python
Executable file
17 lines
444 B
Python
Executable file
#!/usr/bin/env python3
|
|
if __name__ == '__main__':
|
|
import sys
|
|
import pathlib
|
|
|
|
executable = pathlib.Path(sys.executable or 'python3').name
|
|
print('WARNING: the pyenv script is deprecated in favour of '
|
|
'`{} -m venv`'.format(exeutable, file=sys.stderr))
|
|
|
|
rc = 1
|
|
try:
|
|
import venv
|
|
venv.main()
|
|
rc = 0
|
|
except Exception as e:
|
|
print('Error: %s' % e, file=sys.stderr)
|
|
sys.exit(rc)
|