I am just starting with the Ubuntu environment, and I installed Python 2.7.14, but now I see that I have three versions of this program: Python3.6.6; Python2.7.14 and Python 2.7.15rc1.
I want to remove Python2.7.14, but I can't find the specific command for this. I already tried sudo apt purge python2.7-minimal, but this uninstalls the 2.7.15rc1 version, and I want to keep it.
What can I use in order to stay with just the 2.7.15rc1 version?
Related
Where we can find docker release string which is required if you want to specify version during the installation? Is there a list ... or maybe a patern which can use to construct this one?
I was not able to find this kind of info within documentation - nor on the web.
For example:
sudo apt-get install docker-ce
is going to install latest version of the docker-ce (at the moment of writing this it is 17.12). Having in mind that this version have few issues i want to avoid, i need to downgrade (read install) specific version.
We can do that with:
sudo apt-get install docker-ce=<VERSION_STRING>
where you can specify version string. Unfortunatelly, there is no any kind of info (at least i was not able to find), which lists specific version strings (release strings) which you can use.
For example, you can find the list of releases here. But if we check releases (versions) there and if we try to use them, it will not result with installation, instead it will throw an error.
Example:
sudo apt-get install docker-ce=17.09.0
is going to result with error message: "E: Version '17.09.0' for 'docker-ce' was not found".
Where we can find list of releases (strings) which can use for the installation? Or is there any kind of patern which we can use to construct these (like version~ce-0~system eg. 17.12.0~ce-0~debian) ?
You can use apt-cache madison docker-ce command.
The version string is in the second column.
Source: https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-ce-1
As specified in INSTALL DOCKER CE, you can install a specific version using:
sudo apt-get install docker-ce=<VERSION>
You can check the list of available versions via:
apt-cache madison docker-ce
The second column of the output specifies the version that you can substitute in the apt-get install command.
I am using python 2.7.10 with Anaconda 2.3.0, and I use the Anaconda IDE with sublime text 3 (is it a different Anaconda??).
However, for a course I'm taking we're required to use python 3.5.
I would like to keep python 2.7 on my computer, though. What would be the easiest way to have both versions coexist and be easily accessible through the terminal (through sublime would be great, but I'd be happy with managing it on the terminal for now)?
Also, I typically run conda update conda, and conda update anaconda on a regular basis to keep everything up to date. How would that work with different versions of python installed?
This sort of thing is actually what Anaconda is built for. Although the default Python version depends on the installer you used, Anaconda supports both versions. The easiest way is to create a new virtual environment. From the following link, use this conda command to build a Python 3 environment:
conda create -n py35 python=3.5 anaconda
That is if you need Python 3.5 with all the anaconda packages. You can either leave that blank if you just want a vanilla version of Python 3.5, or specify individual packages.
Once you do this, Python 3.5 will be available with the console command py35. You should definitely read the following link about how to manage environments. Really, you should read that whole tutorial.
Using pip with different Python version is a common problem, as I see when I search the Internet. There are a lot of answers around, also in this forum. However nobody seems to encounter the same problem that I have:
I use Canopy python most and it was installed first. Later I installed Anaconda. Now when I try to install a program with pip it always install it in Canopy (or refuse to install it because it is already installed in Canopy.
for example:
$ pip install ipython
gives:
Requirement already satisfied...
but there are no ipython in my Anaconda-folder, it is in the /Enthought/Canopy_64bit/... folder
How can I overcome this problem?
Both versions are 2.7 and even if one is 2.7.11 and the other 2.7.12, it did not work to distinguish between the two by this.
Maybe you can try the following.
Find where both pip-s reside (whereis pip, I have it on ~/anaconda2/bin), then cd to the pip directory of the python version you want, and execute it from there.
I manage with the help of J. Corson comment:
When you want to use a particular Python installation, activate the desired environment. In my chase
source /home/per/anaconda_ete/bin/activate
then using pip made the installation in the anaconda python and I could install ipython and other stuff there... fine, thanks!
i had followed this tutorial in other to overwrite python2.7 with python 3.4.4 and it worked very nice. Only one thing was wrong. typing python, still goes to python2.7 and python3 goes to python3.4.4. so from what i learnt is that
It is critical that you use make altinstall when you install your custom version of Python. If you use the normal make install you will end up with two different versions of Python in the filesystem both named python. This can lead to problems that are very hard to diagnose.
Please help me revert this.
went through this blog Install Python on Linux (Centos).
I had to re-run make altinstall with sudo command of course. I tried this after that
`sudo ln -s /usr/local/bin/python3.4 /usr/local/bin/python`.
which have me
ln: creating symbolic link `/usr/local/bin/python': File exists
I had to delete the path /usr/local/bin/python.
and then tried again.
problem solved
i recently started using python with xubuntu on virtualbox but i'm having problems. I want to be able to use numpy so i thought that apt-get install python-numpy would solve everything, but using the shell i kept getting No module named numpy. I used IDLE and it could find it. I also have IDLE (using Python-2.7), and again it could import numpy. Then i noticed that the shell had python 2.7.9, while the IDLEs had python 2.7.6.
Using
import sys
print sys.path
this if what i get from 2.7.9 (shell)
/usr/local/lib/python2.7/site-packages/setuptools-17.0-py2.7.egg
/usr/local/lib/python2.7/site-packages/Pillow-2.3.0-py2.7-linux-x86_64.egg
/usr/local/lib/python2.7/site-packages/mock-1.0.1-py2.7.egg
/usr/local/lib/python27.zip
/usr/local/lib/python2.7
/usr/local/lib/python2.7/plat-linux2
/usr/local/lib/python2.7/lib-tk
/usr/local/lib/python2.7/lib-old
/usr/local/lib/python2.7/lib-dynload
/usr/local/lib/python2.7/site-packages
and from 2.7.6 (IDLE)
/home/alessandro
/usr/bin
/usr/lib/python2.7
/usr/lib/python2.7/plat-x86_64-linux-gnu
/usr/lib/python2.7/lib-tk
/usr/lib/python2.7/lib-old
/usr/lib/python2.7/lib-dynload
/usr/local/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages/PILcompat
/usr/lib/python2.7/dist-packages/gtk-2.0
/usr/lib/pymodules/python2.7
/usr/lib/python2.7/dist-packages/ubuntu-sso-client
I understand that i have two versions of python installed and somehow i ended up installing packageg into only one of them (the 2.7.6).
I'd like to be able to use 2.7.9 both in the shell and in IDLE and also i'd like to install so that python 2.7.9 can see them.
I read that i can add paths to the python sys.path, but isn't there a more efficient/persistent way to do what i want?
PS: tell me if you need more informations
For my projects I usually create a virtualenv for each python version I need for the project at hand. I manage them using pip to install specific versions that I need. Moreover you should be able to choose the python path in your IDE. While I'm not using IDLE, I read here that apparently idle comes along with the python versions during install. So maybe your idle versions collide with each other. If you want to have only one python version at the time on your machine you might consider a simple remove and fresh install of your desired version. Again I would recommend pip over apt-get etc. Hope this is of help for you.
Worth to check PyDev, a plugin for Eclipse to work on python.
http://marketplace.eclipse.org/content/pydev-python-ide-eclipse , or http://pydev.org/.
This allows you to configure the python version for different project's.
I have some project's with python 2.7 and others with 3.4.
it's checks the whole system in search for the PYTHONPATH to use!