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.

Python 3.6 interpreter - invalid file path

See original GitHub issue

I am trying to use Spyder 4.2.5 with a parallel installation of Python 3.8 and 3.6. Conda is set to be added to the system path. This did work before, and I need python on my system path!

  1. I use a fresh install of Anaconda including python 3.8.
  2. I create an environment with conda create -n py36 python==3.6.8
  3. I want to select python 3.6 within Spyder, however, I get invalid file path - there is no further error message to pin down the problem

image

Solutions I tried (reinstalled anaconda before each)

  • install spyder-kernels via conda within the py36 env (same version as for 4.2.5: 1.10.2)
  • install spyder-kernels via pip
  • run conda update -all
  • run conda update anaconda/conda
  • update to spyder 5.0.0 in both envs

What does work:

  1. install anaconda 2020.07 including Spyder 4.1.5 (with spyder-kernels 1.9.2)
  2. I create an environment with conda create -n py36 python==3.6.8
  3. Manually select python.exe

Why does this not work any longer? Would it be possible to give some more detailed debugging information in this case?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:12 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
skjernscommented, Jul 6, 2021

I solved the problem!

  1. I reinstalled anaconda with the latest version.
  2. I uninstalled both spyder and spyder-kernels from conda base via conda remove spyder --force and conda remove spyder-kernels --force
  3. I installed spyder via pip install spyder and pip install spyder-kernels in the base environment (version 5.0.5 and 2.0.5 respectively)
  4. I created a plain py36 environment conda create -n py36 python pip (without spyder installed there)
  5. I installed the current version of spyder-kernels==2.0.5 in the py36 environment via pip

Now everything works as expected 😃

1reaction
skjernscommented, Jul 6, 2021

Is there any update on this? It still appears with Spyder 5.0.3

I enabled the debuglog, but there seems to be no message related to the failing of detecting the environment, or why Spyder reports that spyder-kernels is not installed in py36 environment, even if it is.

Read more comments on GitHub >

github_iconTop Results From Across the Web

spyder v5: invalid file name when selecting interpreter in ...
spyder v5: invalid file name when selecting interpreter in preferences ... error message: invalid file path: C:/Users/leifs/anaconda3/python3105.exe
Read more >
How to resolve "Invalid Python interpreter name 'python.exe ...
Open the windows prompt · Go to the project root: cd X:\path\to\project · Type python -m venv venv · Chose "existing interpreter" instead...
Read more >
Configure a Python interpreter | PyCharm Documentation
note. If PyCharm displays the Invalid environment warning, it means that the specified Python binary cannot be found in the file system, or...
Read more >
[Solved] Invalid python interpreter selected for the ... - YouTube
" invalid python interpreter selected for the project pycharm" is one of those annoying errors you hate the most. In this video, I...
Read more >
Invalid Syntax in Python: Common Reasons for SyntaxError
This means that the Python interpreter got to the end of a line (EOL) before an open string was closed. To fix this,...
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