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
Related
I'm trying to install Selenium using pip. But when I go to my editor (pycharm CE running on 3.8) no such module exists. When I type python -version on terminal it comes up with python 2.7 with a deprecation warning. How to I change this? I'm pretty sure I have to change my path or something like that, but how? Any help is greatly appreciated.
That's because python2.7 is installed by default on Mac. Python3.8 is probably installed besides 2.7. Use python3.8 command and python3.8 -m pip install selenium to install selenium for this specific python version. If pip is not installed for python3.8, install it the official way.
Don't replace system python, because that might break your OS.
I have MacOS Sierra (10.12.6) and had Python 2.7.13 until I did brew upgrade and now it is showing 2.7.10
What is the best proven/safest way to upgrade to latest python 2.x (at this moment 2.7.14)?
It is curious Python 2.7.13 in Sierra. I thought that Apple has only included Python 2.7.10 for since at least as far back as El Capitan and still on High Sierra. I am on High Sierra and python -v is still 2.7.10 for example. I skipped Sierra so I don't know from personal experience on that one.
You are probably typing python -V in a terminal right? Are you sure which version of python is being found first in the path? Brew can't overwrite Sierra's Python (SIP would protect it from anything trying to change the included Python version) and installs it in usr/local. Brew is the best way I know of for installing Python and you have multiple versions of Python installed with Brew. Take a look in your /usr/local/bin folder. ls /usr/local/bin/python* at the terminal will do it. You probably will have a python2 and maybe a python3 in there, maybe more than one. Brew puts a number after Python for the major version to distinguish it from the system Python. Assuming everything went smooth with Brew then at the terminal you should be able to type python2 -V and or python3 -V depending on which version of python you installed with brew. A reasonably good tutorial for setting up Python on a mac is here http://docs.python-guide.org/en/latest/starting/install/osx/
If you have brew installed and Python 2.x.x run...
brew upgrade python#2
If you have brew installed and no Python 2.x.x run...
brew install python#2
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.
I am trying to install opencv which requires Python 2.7.3 to install. However, in terminal my python continues to point to 2.7.2 although I have installed the 2.7.3 installer from the python website.
How do I solve this?
You can get Homebrew to install the newer version of Python for you:
brew install python
If you've got Homebrew installed (and reading between the lines, assuming you're using Mac OS X).
Homebrew will install to a different place than the system version (2.7.2) so if we want to update or remove this Homebrew version later on, you can revert back to just using the system version instead since you didn't modify it.
I'm a mac newbie and I tried to update my python version from 2.6 to 2.7. Unsuccessful, I changed my mind and uninstalled the python2.7 I had. I had a previous issue that if I typed something like:
python setup.py install
It would not install the package for python2.6, installing to the removed 2.7 version instead, to make it work I have to put
python2.6 setup.py install
And now when I try to install something with easy_install or pip (by the way, pip I have installed after 2.7 issue) I got the following huge message errors: here and here. I want to know how can I clean up my mess.
Since you were trying to install MySQLdb, how about you give ActivePython a try?
Install ActivePython 2.7 (it co-exists with Apple's System Python 2.6)
Open Terminal and type pypm install mysql-python (see PyPM Index) .. no compilation required
Make sure that /usr/local/bin/ is in front of your $PATH.
To uninstall ActivePython, you can do:
sudo /Library/Frameworks/Python.framework/Versions/2.7/Resources/Scripts/uninstall
Or, use sudo pythonselect 2.6 to switch the default Python in /usr/local/bin (if you have multiple versions of non-System Pythons installed)