bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#54860: 28.1; Problem with run-python


From: Robert Thorpe
Subject: bug#54860: 28.1; Problem with run-python
Date: Thu, 14 Apr 2022 02:36:18 +0100

I found the problem.  It's not Emacs so you can close the bug.

It was Microsofts' "App Execution Aliases" system.  When I installed
Python it seems to have been activated.

I thought I could change the settings in "Manage App Execution Aliases"
then repeatedly retry M-x run-python in the same Emacs.  It doesn't work
like that though.  Emacs creates the path to python executable in a
defcustom when python.el is started.  At that time it captures the app
execution alias and stores it.  So, once python.el has started changing
the aliases has no effect.

Turning off all the app execution aliases and restarting Emacs solved
it.

I think the reason that 27.2 had worked was just that the instance of
Emacs had started before I installed Python 3.9.  So, the path to the
python executable had not been interferred with.

BR,
Robert Thorpe

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Robert Thorpe <rt@robertthorpeconsulting.com>
>> Date: Mon, 11 Apr 2022 17:54:56 +0100
>> 
>> 
>> I recently upgraded to Emacs 28.1 on Microsoft Windows.  I'm having
>> problems with Inferior Python mode.  On Emacs 27.2 that mode works.
>> However, it doesn't work on Emacs 28.1, not even from emacs -Q.
>> 
>> Reproduction is easy, from emacs -Q do "M-x run-python" on a Windows 10
>> machine.
>> 
>> The variable exec-path contains the path to the python interpreter
>> ("C:/Program Files/Python39/").  Emacs is correctly picking up the
>> components of exec-path from my PATH environmental variable.
>> 
>> However, run-python gives the error:
>> "Python was not found; run with arguments to install from the Microsoft
>> Store, or disable this shortcut from Setting > Manage App Execution
>> Aliases.
>> 
>> Process Python exited abnormally with code 49"
>
> I cannot reproduce this here.  Could it be that the spaces in
> "Program Files" are somehow the culprit?  (On my system Python is
> installed in a directory without embedded blanks.)
>
> If nothing gives a clue, can you step with Edebug through run-python
> and its subroutines, and see what command is invoked by Emacs and how
> it fails?
>
> Thanks.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]