To begin, download the desired Python version from the official Python website and install it as if it were a normal package on your computer.
To downgrade the Python version on the Linux operating system you may need to follow the below steps: $ brew switch python 3.9.0 For Linux Users: In the below example I have installed version 3.9.0 by uninstalling Python version 3.10.2.
Follow the below code to install the required Python Version.
Homebrew is a software package management system that can be used to downgrade the Python version on your Linux operating system. Uninstalling Python can be accomplished by going to Control Panel -> “Uninstall a program,” searching for “Python,” right-clicking the Python name, and selecting “Uninstall.” Keep in mind that Python typically has a PATH variable stored, so you should also remove it from the environment. Then, from the official Python website, download the version of Python that you want to use and install it on your computer.Įnsure that you have set all of the environment Path variables for the newly installed Python version so that you can access the Python from anywhere in your program’s source code. Alternate OptionĪlternatively, you may choose to uninstall the version of the software that you are currently using from the installed program’s options. This website or an official Python guide. After that, to activate the virtual environment, run the activate.bat batch file, which can be found in the path to the virtual environment’s scripts folder. A virtual environment has now been created for you.Enter virtualenv path\to\env -p \path\to\python_install.exe into the command prompt, where \path\to\env will be the path where your virtual environment will be located and path\to\python_install.exe will be the path where your newly (presumably) installed Python version will be located.Install the Python version you want from here remember not to include it in your PATH environment variable.Open a command prompt (“cmd”) and type pip install virtualenv into the command window.Traceback (most recent call last):įile "C:\.\Anaconda3\lib\runpy.py", line 193, in _run_module_as_mainįile "C:\.\Anaconda3\lib\runpy.py", line 85, in _run_codeįile "C:\Users\SaralJoshi\Desktop\Notebooks\venv\dashshader\Scripts\pip.exe\_main_.py", line 2, in įile "C:\.\Anaconda3\lib\sre_compile.py", line 17, in Īssert _sre. Clearly conda took up some immutable space related to sre_compile.py But I don't understand why it didn't downgrade Python after saying it will downgrade python. Although my problem is solved with pip I have very little idea about what's going on. When I do pip list in the older enivronment, I get an AssertionError: SRE Module mismatch. (newenv) > pip install datashader, another bunch of packages installed, and python -version is #Python 3.6.7 :: Anaconda custom and my package imports are good. Also (dashshader) > python -version #3.7.0-hea74fb7_0. Yet when I did import pandas as pd it failed.
(dashshader) > conda list listed all the packages above including dashshader. Python: 3.7.0-hea74fb7_0 -> 3.6.7-h33f27b4_1īased on above downgrade info I assumed my python will be downgraded in this virtual environment.
Steps followed - > python -m venv dashshader #my spelling mistake wrote data->dash I've been trying to install a particular package - datashader.