diff options
| author | Eli Zaretskii | 2022-04-14 09:17:01 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2022-04-14 09:17:01 +0300 |
| commit | b201823f631082d4f386304ee9ec24b0d85f5def (patch) | |
| tree | 04ce9139337db20746d0df9fe9c842a31ec8c8d9 | |
| parent | 880f2734c95cec7ee6a9eec596e86543508415cd (diff) | |
| download | emacs-b201823f631082d4f386304ee9ec24b0d85f5def.tar.gz emacs-b201823f631082d4f386304ee9ec24b0d85f5def.zip | |
Describe problems with invoking Python on MS-Windows
* etc/PROBLEMS: Describe problems with running an inferior Python
interpreter due to the MS-Windows "App Execution Aliases" feature.
(Bug#54860)
| -rw-r--r-- | etc/PROBLEMS | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/etc/PROBLEMS b/etc/PROBLEMS index e48ce5a8b0c..5e88f289c26 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS | |||
| @@ -651,6 +651,46 @@ And then rename the system's readline so that it won't be loaded: | |||
| 651 | See <https://pypi.python.org/pypi/gnureadline> for more details on | 651 | See <https://pypi.python.org/pypi/gnureadline> for more details on |
| 652 | installation. | 652 | installation. |
| 653 | 653 | ||
| 654 | *** On MS-Windows, invoking "M-x run-python" signals an error. | ||
| 655 | |||
| 656 | If the error says something like this: | ||
| 657 | |||
| 658 | Python was not found; run with arguments to install | ||
| 659 | from the Microsoft Store, or disable this shortcut | ||
| 660 | from Settings > Manage App Execution Aliases. | ||
| 661 | |||
| 662 | Process Python exited abnormally with code 49 | ||
| 663 | |||
| 664 | then this is due to the MS-Windows "feature" that is intended to | ||
| 665 | encourage you to install the latest available Python version. It | ||
| 666 | works by placing "fake" python.exe and python3.exe executables in a | ||
| 667 | special directory, and having that directory on your Path _before_ the | ||
| 668 | directory where the real Python executable is installed. That "fake" | ||
| 669 | Python then decides whether to redirect you to the Microsoft Store or | ||
| 670 | invoke the actual Python. The directory where Windows keeps those | ||
| 671 | "fake" executables is under your Windows user's 'AppData' directory, | ||
| 672 | typically 'C:\Users\<user>\AppData\Local\Microsoft\WindowsApps', where | ||
| 673 | "<user>" is the user name of your Windows user. | ||
| 674 | |||
| 675 | To solve this, you have several alternatives: | ||
| 676 | |||
| 677 | . Go to "Settings > Manage App Execution Aliases" and turn OFF the | ||
| 678 | aliases for python.exe and/or python3.exe. This will affect only | ||
| 679 | Python, and may require you to manage upgrades to your Python | ||
| 680 | installation manually, instead of being automatically prompted by | ||
| 681 | MS-Windows. | ||
| 682 | . Move the directory with the "fake" executables to the end of Path, | ||
| 683 | or at least after the directory where the real Python is | ||
| 684 | installed. Depending on the position in Path where you move it, | ||
| 685 | it will affect Python and/or other programs which Windows monitors | ||
| 686 | via the "App Execution Aliases" feature. | ||
| 687 | . Manually remove python.exe and/or python3.exe from the above | ||
| 688 | directory. Again, this affects only your Python installation. | ||
| 689 | |||
| 690 | Whatever you do, you will need to restart Emacs to refresh its notion | ||
| 691 | of the directory where python.exe/python3.exe lives, because that is | ||
| 692 | recorded when Python mode is started. | ||
| 693 | |||
| 654 | *** Visiting files in some auto-mounted directories causes Emacs to print | 694 | *** Visiting files in some auto-mounted directories causes Emacs to print |
| 655 | 'Error reading dir-locals: (file-error "Read error" "is a directory" ...' | 695 | 'Error reading dir-locals: (file-error "Read error" "is a directory" ...' |
| 656 | 696 | ||