![]() Usually, you can find all the Python files at either C:\Program Files (x86)\Pythonxx, C:\Users\username\AppData\Local\Programs\Pythonxx or C:\Pythonxx or all of them. Now double-check whether there are any remaining files where Python used to be stored. Remove unwanted path name from %path% variable via batch.Bear in mind that Python usually has a PATH variable stored, hence you should remove it as well - Check the following links for this: ![]() To remove the "old" version go to Control Panel -> "Uninstall a program" -> Search for "Python" -> Right-click on the Python name -> Uninstall. The basic option would be to uninstall the unwanted Python version and re-install the favored one from. this website or an official Python guide) Option 2 Using VirtualEnv with multiple Python versions on windowsġ.) Open command prompt ("cmd") and enter pip install virtualenv.Ģ.) Install your desired Python version via Remember: Do not add to PATH!ģ.) Type into the command prompt: virtualenv \path\to\env -p \path\to\python_install.exe, whereas \path\to\env shall be the path where your virtual environment is going to be and \path\to\python_install.exe the one where your freshly (presumably) installed Python version resides.Ĥ.) Done! You now have a virtual environment set up! Now, to activate the virtual environment execute the batch file which is located inside the \path\to\env\Scripts\activate.bat.Easily manageable and the best part: There are lots of tutorials on the internet on how to approach this: With this approach, you easily can set up project-specific Python versions (as well as libraries). ![]() In general, it's suggested to use virtual environments (I highly suggest looking at the official Python documentation). What follows are possibilities for Microsoft Windows, Linux, macOS and Misc.Īs mentioned those are just possibilities - by no means do I claim to have a complete list whatsoever. ![]() Here is a canonical summary which sums up different solutions for the variety of operating system Python runs on.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |