question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't set custom interpreters in Preferences on macOS

See original GitHub issue

Issue Report Checklist

  • Searched the issues page for similar reports
  • Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
  • Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
  • [] Could not reproduce inside jupyter qtconsole (if console-related) not applicable
  • Tried basic troubleshooting (if a bug/error)
    • Restarted Spyder
    • Reset preferences with spyder --reset
    • Reinstalled the latest version of Anaconda
    • Tried the other applicable steps from the Troubleshooting Guide
  • Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description

On a fresh copy of macOS 10.15.5 (“Catalina”), with a fresh install of Anaconda, it does not appear to be possible to use what your docs call “the modular approach” to set the Python interpreter if Spyder is runing under Python 3.7 and the desired version of the interpreter is Python 3.8.

I have checked, and the Python interpreter I’m trying to use is marked as executable, and can be used in a terminal shell to launch a Python REPL session. There appears to be nothing “invalid” about it.

What steps reproduce the problem?

  1. Install Anaconda
  2. conda create -n test python=3.8 spyder-kernels
  3. Launch spyder from the base environment (either from terminal or through Anaconda Navigator GUI)
  4. Try to set the Python interpreter Preferences > Python Interpreter > Use the following Python interpreter to /Users/username/opt/anaconda3/envs/test/bin/python

What is the expected output? What do you see instead?

Expected: consoles will use the Python 3.8 interpreter.

Actual: an error dialog saying:

You selected an invalid Python interpreter for the console so the previous interpreter will stay. Please make sure to select a valid one.

The message is accurate; the console interpreter has in fact stayed as the spyder-internal console (confirmed by import sys; print(sys.executable). Note that if step 2 above is changed to conda create -n test python=3.7 spyder-kernels then it is possible to set the interpreter, so it appears to be something specific about Python 3.8 that is the problem.

Paste Traceback/Error Below (if applicable)

Not applicable; internal console shows only startup greeting and empty prompt

Versions

  • Spyder version: 4.1.3
  • Python version: 3.7.6
  • Qt version: 5.9.6
  • PyQt version: 5.9.2
  • Operating System name/version: Darwin 19.5.0

Dependencies

# Mandatory:
applaunchservices >=0.1.7      :  0.2.1 (OK)
atomicwrites >=1.2.0           :  1.4.0 (OK)
chardet >=2.0.0                :  3.0.4 (OK)
cloudpickle >=0.5.0            :  1.5.0 (OK)
diff_match_patch >=20181111    :  20181111 (OK)
intervaltree                   :  None (OK)
IPython >=4.0                  :  7.16.1 (OK)
jedi =0.15.2                   :  0.15.2 (OK)
nbconvert >=4.0                :  5.6.1 (OK)
numpydoc >=0.6.0               :  1.1.0 (OK)
parso =0.5.2                   :  0.5.2 (OK)
pexpect >=4.4.0                :  4.8.0 (OK)
pickleshare >=0.4              :  0.7.5 (OK)
psutil >=5.3                   :  5.7.0 (OK)
pygments >=2.0                 :  2.6.1 (OK)
pylint >=0.25                  :  2.4.4 (OK)
pyls >=0.31.9;<0.32.0          :  0.31.10 (OK)
qdarkstyle >=2.8               :  2.8.1 (OK)
qtawesome >=0.5.7              :  0.7.2 (OK)
qtconsole >=4.6.0              :  4.7.5 (OK)
qtpy >=1.5.0                   :  1.9.0 (OK)
rtree >=0.8.3                  :  0.9.4 (OK)
sphinx >=0.6.6                 :  3.1.2 (OK)
spyder_kernels >=1.9.1;<1.10.0 :  1.9.1 (OK)
watchdog                       :  None (OK)
zmq >=17                       :  19.0.1 (OK)

# Optional:
cython >=0.21                  :  0.29.20 (OK)
matplotlib >=2.0.0             :  3.2.2 (OK)
numpy >=1.7                    :  1.18.5 (OK)
pandas >=0.13.1                :  1.0.5 (OK)
scipy >=0.17.0                 :  1.5.0 (OK)
sympy >=0.7.3                  :  1.6.1 (OK)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:46 (30 by maintainers)

github_iconTop GitHub Comments

2reactions
ccordoba12commented, Jul 15, 2020

@juanis2112, thanks for helping @drammock with his problem. You did a great job guiding him to check that this bug was effectively fixed in our 4.1.4 version. Sorry for stepping in without reading the whole context of this issue.

Of course, all these dependency conflicts would go away if there were an easy standalone binary installer for Spyder for all platforms. 😃

Then you’ll be happy to hear that we’re working on our own installers for Windows and macOS for 4.2.0 (to be released in September).

1reaction
larsonercommented, Jan 11, 2021

Awesome, thanks @ccordoba12 !

Read more comments on GitHub >

github_iconTop Results From Across the Web

Customize your Mac with System Settings - Apple Support
To change System Settings on your Mac, click the System Settings icon in the Dock or choose Apple menu > System Settings. Open...
Read more >
Configure a Python interpreter | PyCharm Documentation
Do one of the following: Click the Python Interpreter selector and choose Add New Interpreter. Press Ctrl+Alt+S to open Settings/Preferences and ...
Read more >
Setting environment variables on OS X - macos - Stack Overflow
EnvPane is a preference pane for Mac OS X 10.8 (Mountain Lion) that lets you set environment variables for all programs in both...
Read more >
Configuring a local Python interpreter in PyCharm - YouTube
This is the Getting Started Series, with Paul Everitt.In this episode, you will learn how to create local interpreters in PyCharm with ...
Read more >
Settings Reference for Python - Visual Studio Code
Note: Changes to this setting made after an interpreter has been selected for a workspace will not be applied or considered by the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found