Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run Python Launcher on Windows #69276

Closed
BreamoreBoy mannequin opened this issue Sep 13, 2015 · 19 comments
Closed

Can't run Python Launcher on Windows #69276

BreamoreBoy mannequin opened this issue Sep 13, 2015 · 19 comments
Assignees
Labels
OS-windows type-bug An unexpected behavior, bug, or error

Comments

@BreamoreBoy
Copy link
Mannequin

BreamoreBoy mannequin commented Sep 13, 2015

BPO 25089
Nosy @terryjreedy, @pfmoore, @tjguk, @zware, @zooba
Files
  • Python 3.5.0 (64-bit)_20150913191600.log: Main log file as requested.
  • Python 3.5.0 (64-bit)_20151207124434_000_launcher_AllUsers.log: The only launcher log in the directory.
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/zooba'
    closed_at = <Date 2016-01-16.20:01:31.065>
    created_at = <Date 2015-09-13.22:44:57.329>
    labels = ['type-bug', 'OS-windows']
    title = "Can't run Python Launcher on Windows"
    updated_at = <Date 2016-01-16.20:01:31.064>
    user = 'https://bugs.python.org/BreamoreBoy'

    bugs.python.org fields:

    activity = <Date 2016-01-16.20:01:31.064>
    actor = 'steve.dower'
    assignee = 'steve.dower'
    closed = True
    closed_date = <Date 2016-01-16.20:01:31.065>
    closer = 'steve.dower'
    components = ['Windows']
    creation = <Date 2015-09-13.22:44:57.329>
    creator = 'BreamoreBoy'
    dependencies = []
    files = ['40461', '41263']
    hgrepos = []
    issue_num = 25089
    keywords = []
    message_count = 19.0
    messages = ['250588', '250591', '250592', '250594', '250604', '250611', '250664', '250670', '252555', '252556', '256064', '256069', '256080', '256086', '256088', '256095', '256100', '258403', '258404']
    nosy_count = 7.0
    nosy_names = ['terry.reedy', 'paul.moore', 'tim.golden', 'BreamoreBoy', 'python-dev', 'zach.ware', 'steve.dower']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue25089'
    versions = ['Python 3.5']

    @BreamoreBoy
    Copy link
    Mannequin Author

    BreamoreBoy mannequin commented Sep 13, 2015

    I first asked a few days ago, see this thread http://www.gossamer-threads.com/lists/python/python/1216917. You can work around it by running "repair" but it takes an age to run for what, to me anyway, is a minor irritant.

    @BreamoreBoy BreamoreBoy mannequin added OS-windows type-bug An unexpected behavior, bug, or error labels Sep 13, 2015
    @zooba
    Copy link
    Member

    zooba commented Sep 14, 2015

    I don't understand what you did and what the result was from that thread.

    • What options did you select when installing 3.5?
    • What other Python versions did you have? What options were used to install them?
    • Where was py.exe before installing 3.5?
    • Can you attach all of the logs from your 3.5 install (from your %TEMP%)?

    @terryjreedy
    Copy link
    Member

    For anyone else reading this, Mark says he already re-tried with 3.5.0.

    The only problem I had with the install on my Win7, with 2.7.10, 3.4.3, and 3.5.0rc3 already present, is that 3.4.3 is still the default python (started by 'python') in spite of checking everything relevant when installing 3.5.0.

    @zooba
    Copy link
    Member

    zooba commented Sep 14, 2015

    Yeah, it's basically impossible to manage PATH automatically. You've probably installed 3.5 just for yourself while 3.4 is installed for all users. In this case, 3.5 will always lose because Windows puts user paths after system paths.

    You could modify 3.4 to remove it from PATH or use py.exe, which resolves versions correctly. Or you can modify your PATH manually.

    @terryjreedy
    Copy link
    Member

    I did installed 3.5 for all users. Logging into another user and back changed 'python' association. So ok now.

    @BreamoreBoy
    Copy link
    Mannequin Author

    BreamoreBoy mannequin commented Sep 14, 2015

    I install for all users, don't put Python on the PATH, other than that I think everything is selected.

    I've 2.6, 2.7. 3.3 and 3.4. I had 3.5.0rc4 and upgraded the existing installation to 3.5.0 full release.

    I've no idea where py.exe was, but it is now in C:\Windows. This is what I expect having just read PEP-397.

    Do you really want all logs from the 3.5.0 install and the repair, that's 21 files? It's an odd number as there is no log file for the launcher in the install but there is in the repair. The same is true for the rc4 logs.

    @zooba
    Copy link
    Member

    zooba commented Sep 14, 2015

    Just the main log file from the initial install is enough if there's no log for the launcher. It probably means the initial setup startup deselected it for some reason.

    @zooba
    Copy link
    Member

    zooba commented Sep 14, 2015

    Yep, as part of the upgrade detection we're choosing not to install the launcher. Not sure whether that's because of a bug or a previous install on your machine, but I'll take a closer look.

    @zooba zooba self-assigned this Sep 14, 2015
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Oct 8, 2015

    New changeset 1e99ba6b7c98 by Steve Dower in branch '3.5':
    Issue bpo-25089: Adds logging to installer for case where launcher is not selected on upgrade.
    https://hg.python.org/cpython/rev/1e99ba6b7c98

    @zooba
    Copy link
    Member

    zooba commented Oct 8, 2015

    Hopefully with the extra logging we'll be able to see if something is failing at the point of detection. Any failure here (permissions in registry, etc.) will cause the launcher to not be installed on upgrade (which might be the same as removing it... I need to spend more time working through the dependencies involved here because they are messy).

    @BreamoreBoy
    Copy link
    Mannequin Author

    BreamoreBoy mannequin commented Dec 7, 2015

    After running the 3.5.1 64 bit web installer the py launcher has again been lost, i.e. "'py' is not recognized as an internal or external command, operable program or batch file." Running the web installer in "repair" mode hasn't made any difference. I've attached the log file for the removal of the 3.5.0 launcher, but there are no launcher files with the 3.5.1 install or repair.

    @zooba
    Copy link
    Member

    zooba commented Dec 7, 2015

    There's a separate issue in the 3.5.1 installer where the launcher is always deselected on upgrade. I'm currently working on a fix to force it to always install and we might push out a new 3.5.1 build later today.

    If you go through Modify rather than Repair then you can select to install the launcher.

    @BreamoreBoy
    Copy link
    Mannequin Author

    BreamoreBoy mannequin commented Dec 7, 2015

    Using "modify" rather than "repair" fixed the launcher issue, a pity about this.

    py
    Python 3.5.1 (v3.5.1:37a07cee5969, Dec  6 2015, 01:54:25) [MSC v.1900 64 bit (AMD64)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import tkinter
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ImportError: No module named 'tkinter'
    >>>

    I only selected launcher as that was the only thing I expected to be modified. However the modify also took an age as I recall seeing loads of stuff about test files. You might gather that I'm extremely confused about the entire process, so exactly what is going on here?

    @zooba
    Copy link
    Member

    zooba commented Dec 7, 2015

    Did you deselect everything else? That will remove it all.

    @BreamoreBoy
    Copy link
    Mannequin Author

    BreamoreBoy mannequin commented Dec 7, 2015

    Of course I deselected everything, the only thing I wanted modified was the launcher, I wanted everything else left alone.

    @zooba
    Copy link
    Member

    zooba commented Dec 8, 2015

    The convention when modifying installations is to specify the end-state that you're want, so unchecking something indicates that you want to remove it.

    This could be made clearer, but it's probably a significant redesign of the UI. At the least we could specify in the text how it works, but in my experience most people don't read that anyway. (If you did read it, let me know as that's a good data point in favour of doing it.)

    @BreamoreBoy
    Copy link
    Mannequin Author

    BreamoreBoy mannequin commented Dec 8, 2015

    If by "in the text" you mean here https://docs.python.org/3/using/windows.html then yes please, as I find a few minutes of RTFM can save hours of wasted time.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jan 16, 2016

    New changeset 5fc9bd33a712 by Steve Dower in branch '3.5':
    Issue bpo-25089: Adds short documentation section for modifying an install.
    https://hg.python.org/cpython/rev/5fc9bd33a712

    New changeset 4b06490cca47 by Steve Dower in branch 'default':
    Issue bpo-25089: Adds short documentation section for modifying an install.
    https://hg.python.org/cpython/rev/4b06490cca47

    @zooba
    Copy link
    Member

    zooba commented Jan 16, 2016

    I've added a brief doc section on modifying and removing the install, so hopefully that suffices for this issue. If the original issue occurs again, feel free to reopen, but I think it'll be okay.

    I have a few ideas about changing the installer to be more intuitive, but those would be separate.

    @zooba zooba closed this as completed Jan 16, 2016
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    OS-windows type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants