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

Python notes in Traditional Instructions for Windows need corrections #287

Open
gandalfas opened this issue Apr 16, 2023 · 0 comments
Open
Labels
bug Something isn't working

Comments

@gandalfas
Copy link

Issue Description

The wrong version of Python 3 is specified in "Traditional Installation"" instructions for Windows on Getting Started.

In my install, for various reasons, I chose to do the Traditional Install, even though I was installing Swift 5.6.1. In that section, in the second table, it specifies Python 3 64-bit (3.7.8). I installed as stated, then ran 'lldb Factorial' as shown on Getting Started under section "Using the LLDB Debugger". That elicted the error dialog:

The code execution cannot proceed because python310.dll was not found.

This is correctable by installing Python 3.10.4.

Unfortunately, you can't get 3.10.4 from Visual Studio Installer because only older versions are offered there. This is correctable by downloading that version manually.

Requested Change

This is for page Getting Started. Assuming that we will be keeping the Traditional Instructions for some time to come...

In section: Installing Swift > On Windows > Installation Instructions > Traditional Installation, remove the following reference from the table:

Python 3 64-bit (3.7.8)

Then, just after the table but before "The following additional Visual Studio component is suggested:", insert the following :

Python 3 64-bit 3.10.4 is also recommended, but it isn't available in Visual Studio Installer.

To download:
 - go to https://www.python.org/downloads/release/python-3104/
 - Find the line for Python 3.10.4 (3/24/22)
 - Find the version "Windows Installer (64-bit)"
 - click that to download the file python-3.10.4-amd64.exe

To install, run the installer under Administrator and follow these installer tips:
 - Unselect Install launcher
 - Select Add to PATH
 - Customize the install
 - Unselect Documentation
 - Select pip -- this will be needed below
 - Unselect tcl/tk
 - Unselect Python test suite
 - Unselect py launcher
 - Select Install for all users
 - Select create shortcuts
 - Select add python env vars
 - Select precompile standard lib

When the install is complete, verify that the environment vars are set correctly:

  PATH - the Python directory should be in here (you may want to move it down some, if it's only needed during the use of lldb).  also, (Python-root)\Scripts should be in the PATH, just after the python directory, so that 'pip' is available (will be needed to get the 'six' module, described just below).

  PYTHONHOME - should point to your Python root dir.

  PYTHONPATH - should be:   (your-Python-root)\Lib;(your-Python-root)\Lib\site-packages


Then, install the Python 'six' module, into the site-packages subdirectory.  This is needed by lldb:

Start a Command Prompt, with Run as administrator.  then do:
  cd /d %PYTHONHOME%
  pip install six

Related Issues

This was originally submitted in:

  • 58438 - lldb gets error dialog: The code execution cannot proceed because python310.dll was not found.
  • 58447 - lldb gets error: Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding. error: ModuleNotFoundError: No module named 'encodings'
  • 58448 - lldb gets error: ModuleNotFoundError: No module named 'six'

Environment details

Desktop

  • OS: Windows 10 desktop computer
  • Version: Swift 5.6.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant