I have already python 2.7.9 in C:\Python27
I try to install python 2.7.6 from python.org on C:\Python276
And after the installation :
C:\Python27\python.exe --version return Python 2.7.9
C:\Python276\python.exe --version return Python 2.7.9
Am I missing something ?
How to install multiple python version on Windows 7 (Microsoft Windows [version 6.1.7601]) ?
Use Python Launcher for Windows which allows you to specify which version you want to execute using a shebang. Just place one of these at the top of your script to do so.
#!python276
#!python279
#eryksun give the solution :
python.exe is a loader that's linked to the interpreter DLL, e.g. python27.dll. The problem is likely you installed both versions for all users.
Try installing 2.7.6 for just the current user. That should install the DLL to C:\Python276.
Related
I'm currently using Mac Pro and downloaded python through brew install python for the latest version (though it downloaded 3.9.12 instead of 3.10.x).
Also, while playing with the command lines, I also installed pyenv (version 2.2.5).
The problem is, I am now unable to get the default python version.
The command python --version and python -h all gives me zsh: command not found: python.
However, when I do python3 --version, it gives me Python 3.9.12.
Did I mess things up? Is there are way to go back to the state before I altered anything? (or at least recover my default python version?)
What version of MacOS are you running? Starting in 12.3, Python2 was removed from the system.
https://developer.apple.com/documentation/macos-release-notes/macos-12_3-release-notes
Python
Deprecations
Python 2.7 was removed from macOS in this update. Developers should use Python 3 or an alternative language instead. (39795874)
I have updated my python version to 3.8 multiple times already via the python official website. On my mac in the terminal I type in the following command and it continues to tell me I am using 2.7.16. How can I tell my computer to stop using this old version?
Matthews-MBP:~ matthew$ python --version
Python 2.7.16
Chances are the new python is installed as python3, python3.8, or python3.8m. Try:
python3 --version
python3.8 --version
python3.8m --version
terminal message
I have been having issues with installing things in the terminal Python related like: https://github.com/RomelTorres/alpha_vantage
I did try to uninstall python and install Python 3.8.2 but when I do "python --version" I get Python 2.7.16.
You probably do not have to uninstall it, instead of using the keyword python, try python3. python3 --version will most likely give the version 3.8.2 if you have it installed. On most Linux distributions, and I'm assuming on macOS too, python refers to Python 2 instead of Python 3 for backwards compatibility, so you have to explicitly tell it to use Python 3.
Background:
I am a .NET developer trying to set up a python programming environment.
I have installed python 2.7.5. However I changed my mind and uninstalled 2.7.5 and installed python 2.7.6.
If I CMD in windows command promopt, the python version is 2.7.6
When I start the cygwin shell and type:
python --version
It says 2.7.5, this version is was uninstalled.
How do I get cygwin to understand it should use the new version. 2.7.6?
I believe there is commands to type in cygwin shell to solve this? Thanks on advance!
Cygwin has its own option to install its own version of Python. If you run setup.exe and poke through the Development packages, you'll find it. You probably installed Python here as well, and are running it in Bash. If you use CMD, you're running a different version. The fact that the version numbers overlap is just coincidental.
I have tried to install 2 versions of gedit in linux with python version of 2.7.3
gedit 3.8.1 and gedit 3.7.6 both come with error when i use ./configure
"configure: error: no suitable Python interpreter found"
can I know which version of gedit to install to suit with my python version?
As far as I know gedit is installed by default. Try type gedit in a terminal and see if it opens.
alternatively in a terminal type sudo apt-get install gedit This will install Ubuntu's current favorate version of gedit.
In either case this wont get you the latest version but unless you are super keen on the latest version for some reason then don't worry about it.
If you do want the latest version you need to install python3 first in which case this should help: https://askubuntu.com/questions/244544/how-to-install-python-3-3