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:
- https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/gcJKEMOZBZc
- Can't install Spyder through Anaconda Navigator
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.