1

I need to open Spyder with Python3.6 because of compatibility issues while trying to import the cv2 module. I'm using Windows 10.


NOTE: Alternative solution below

I didn't manage to do it the way it's specified in this post. I encountered the following errors:

These two pages might be useful for those looking to solve this problem the way I first tried (specified below this note).


The way I solved it:

Instead, in order to use Spyder with Python 3.6, in Spyder I went to: 'Tools' > 'Preferences' > 'Python interpreter' > 'Use the following interpreter:', where I pasted the route of my Python 3.6 executable (should look like something similar to C:\Users\user_name\AppData\Local\Programs\Python\Python36\python.exe).

The next time I executed Spyder, It was running on Python 3.6 flawlessly.

END NOTE


An answer in this useful post suggested running the following code in the Anaconda Prompt to change the version:

conda create -n py36 python=3.6  #for version 3.6
activate py36

Which seemed to work, as now Anaconda lets me run 'py36' in 'Applications':

But when I try to install Spyder 4.1.4 after changing to 'py36', the 'Install' button doesn't do much. A blue downloading bar appears, but once it finishes downloading whatever and the bar disappears, the 'Install' button never actually updates to 'Launch':

The Anaconda version i'm using is:

# packages in environment at C:\Anaconda3:
#
# Name                    Version                   Build  Channel
anaconda                  2020.07                  py37_0
anaconda-client           1.7.2                    py37_0
anaconda-navigator        1.9.12                   py37_0
anaconda-project          0.8.4                      py_0

Thank you very much.


EDIT: as user Arjun Muraleedharan suggested, I tried installing Spyder through the Anaconda prompt:

conda activate py36
conda install spyder

But i got this error at the end of a long list of newly installed packages:

ERROR conda.core.link:_execute(700): An error occurred while installing package 'defaults::icu-58.2-ha925a31_3'.
Rolling back transaction: done

[Errno 13] Permission denied: 'C:\\Anaconda3\\envs\\py36\\Library\\bin\\icudt58.dll'
()

I tried running the Anaconda prompt as an administrator and it gave me the same error.

pypau
  • 79
  • 1
  • 11
  • try `conda install spyder` from the conda promt – krxat Aug 04 '20 at 11:34
  • after running that, i got this: ```Collecting package metadata (current_repodata.json): done Solving environment: done # All requested packages already installed.``` – pypau Aug 04 '20 at 11:35
  • 1
    you should activate the environment first by `conda activate environment_name` which is in your case `conda activate py36` in the conda promt – krxat Aug 04 '20 at 11:37
  • hi, i added an edit to my post regarding your answer – pypau Aug 04 '20 at 11:49
  • You need to run the anaconda command prompt as admin it seems. I'm guessing you are using windows. So you need to search for anaconda prompt in the search, right-click and select run as admin then do the same. – krxat Aug 04 '20 at 11:51
  • just tried that, it gave the same error. yes, sorry for forgetting, i am using Windows 10 – pypau Aug 04 '20 at 11:54
  • 1
    https://github.com/conda/conda/issues/4534, can you check this thread and see if anything works for you? – krxat Aug 04 '20 at 11:58
  • i checked everything on that page and nothing worked. instead of creating the py36 environment in Anaconda in order to run Python 3.6 with spyder, i simply changed the interpreter route in the 'Tools' > 'Preferences' > 'Interpreter' section in Spyder and that worked flawlessly. Thank you for your help though, it is very much appreciated. – pypau Aug 04 '20 at 13:36

1 Answers1

0

I didn't manage to do it the way it's specified in this post. I encountered the following errors:

These two pages might be useful for those looking to solve this problem the way I first tried (specified below this note).


The way I solved it:

Instead, in order to use Spyder with Python 3.6, in Spyder I went to: 'Tools' > 'Preferences' > 'Python interpreter' > 'Use the following interpreter:', where I pasted the route of my Python 3.6 executable (should look like something similar to C:\Users\user_name\AppData\Local\Programs\Python\Python36\python.exe).

The next time I executed Spyder, It was running on Python 3.6 flawlessly.

pypau
  • 79
  • 1
  • 11