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 instances not discoverable on Windows if an instance is already chosen #9379

Closed
4 tasks
ronblum opened this issue May 20, 2021 · 3 comments · Fixed by #9403
Closed
4 tasks

Python instances not discoverable on Windows if an instance is already chosen #9379

ronblum opened this issue May 20, 2021 · 3 comments · Fixed by #9403
Assignees

Comments

@ronblum
Copy link
Contributor

ronblum commented May 20, 2021

System details

RStudio Edition : Desktop
RStudio Version : 1.4.1712-1
OS Version      : Windows 10
R Version       : 4.1.0

Steps to reproduce the problem

If a Python instance isn't already chosen:

  1. Tools -> Global Options -> Python -> Select
  2. Select a Python instance to use
  3. OK

Then:

  1. Tools -> Global Options -> Python -> Select

Describe the problem in detail

After step 4, no Python instances are discovered. An empty window pops up:
python_path

Describe the behavior you expected

I installed the Python instances in their default locations. They should be discoverable.

  • I have read the guide for submitting good bug reports.
  • I have installed the latest version of RStudio, and confirmed that the issue still persists.
  • If I am reporting an RStudio crash, I have included a diagnostics report.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
@ronblum
Copy link
Contributor Author

ronblum commented May 24, 2021

Tested with RStudio Desktop 1.4.1716 on Windows 10, but it doesn't work.

I have three instances of Python installed:

  • Python 3.8 using the default (user directory): C:\Users\RonBl\AppData\Local\Programs\Python\Python38
  • Python 3.9 using custom system installation: C:\Program Files\Python39
  • Python 2.7 in the root directory: C:\Python27

Python only shows up if at least one of these is added to the PATH.

  1. If only Python 2.7 (root) is added to PATH, only it shows up.
  2. If only Python 3.8 (system) is added to PATH, both 2.7 and 3.8 show up, but 3.9.
  3. If only Python 3.9 (user) is added to PATH, all three show up.

@ronblum ronblum added backlog and removed test labels May 24, 2021
@kevinushey
Copy link
Contributor

Note: most likely cause appears to be the set of discovered Python versions being converted to a Javascript map rather than array.

Screen Shot 2021-05-24 at 2 43 49 PM

Also: need to ensure that Python installations in C:\Program Files are discovered as well.

@ronblum
Copy link
Contributor Author

ronblum commented May 25, 2021

Verified that this works in RStudio Desktop 1.4.1717 on Windows 10, even when no Python executables are in the path.

@ronblum ronblum closed this as completed May 25, 2021
@ronblum ronblum removed the test label May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants