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 gvanrossum
Recipients gvanrossum, paul.moore, steve.dower, tim.golden, zach.ware
Date 2020-11-22.05:17:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1606022258.04.0.96368349872.issue42430@roundup.psfhosted.org>
In-reply-to
Content
I have 3.9 and 3.10 installed on my Windows box.

The py launcher runs Python 3.10 when invoked on a script starting with a shebang line

#!/usr/bin/env python

even though the default without a script is 3.9, as shown here:

PS C:\Users\gvanrossum\peps> py -0
Installed Pythons found by C:\WINDOWS\py.exe Launcher for Windows
 -3.9-64 *
 -3.8-64
 -3.7-64
 -3.6-64
 -3.5-64
 -3.4-64
 -3.10-64

PS C:\Users\gvanrossum\peps> py   
Python 3.9.0 (tags/v3.9.0:9cf6752, Oct  5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> ^Z

PS C:\Users\gvanrossum\peps> 

This caused some confusion since I was running a script that imported a package that I had installed in the default interpreter but not in 3.10.

I am not using a virtual environment (yet :-).

Without the shebang line the 3.9 interpreter is used.

(Full disclosure: the script was pep2html.py, and the package was docutils.)
History
Date User Action Args
2020-11-22 05:17:38gvanrossumsetrecipients: + gvanrossum, paul.moore, tim.golden, zach.ware, steve.dower
2020-11-22 05:17:38gvanrossumsetmessageid: <1606022258.04.0.96368349872.issue42430@roundup.psfhosted.org>
2020-11-22 05:17:37gvanrossumlinkissue42430 messages
2020-11-22 05:17:37gvanrossumcreate