0

After installing Python version 3.8.0b4 (on my macbook, runnins macOS: Mojave), my IDE (Spyder version 4.0.0 beta4) defaults to Python version 2.7 (the root version). How do I modify the Spyder PYTHONPATH to point to the newer Python version, 3.8.0b4? The installation is done with pyenv, and located in my user directory, in a hidden folder named: ".pyenv". When attempting to modify the PYTHONPATH from within Spyder, only visible/non-hidden folders are selectable.

enter image description here

Gustav Rasmussen
  • 3,720
  • 4
  • 23
  • 53
  • 2
    I think the preferred way is to use tools->preferences->python interpreter. Then point that at the environment/python version you want to use. – matt Sep 18 '19 at 10:55
  • 1
    Right click on the dialog, and there'll be a checkbox for 'hidden files' .files are considered hidden files. – matt Sep 18 '19 at 13:22
  • 1
    @matt is right. You need to change your Python interpreter instead of using PYTHONPATH because that would effectively mix two different Python versions (the one Spyder is running and the one you want to add), which generates all kinds of nasty errors and segfaults. – Carlos Cordoba Sep 19 '19 at 11:07
  • @CarlosCordoba I added a screenshot of my Spyder session to the original question in the top. I get the following warning message: You selected a Python 3 interpreter for the console but Spyder is running on Python 2!. Although this is possible, we recommend you to install and run Spyder directly with your selected interpreter, to avoid seeing false warnings and errors due to the incompatible syntax between these two Python versions. – Gustav Rasmussen Sep 19 '19 at 15:52
  • That's just a warning – Carlos Cordoba Sep 19 '19 at 16:32

0 Answers0