I am using Ubuntu 16.04 LTS and Python 2.7.12, and just recently installed Anaconda. However, I am in a similar situation and had the very same concern. Here is my answer, and it may or may not be the actual specific answer to what you have done to your own system. # CONDA_CHANGEPS1=false conda activate baseĪnd while you won't see the conda folder in the path anymore, the conda command will still run fine, and your original python, python3, and pipenv commands will as well. I am uncertain what significance CONDA_CHANGEPS1=false has, but haven't run into any issues so far. No need to touch any other part of the new additions.
![python to 2.7.3 to 2.7.9 python to 2.7.3 to 2.7.9](https://i.stack.imgur.com/BWUsd.png)
Now, to achieve the same thing, edit ~/.bashrc and comment out the line below like so to prevent the base layer (base environment) from activating in every terminal.
Python to 2.7.3 to 2.7.9 code#
Starting in Conda 4.4, they changed the code added to ~/.bashrc. It should restore the versions for previous programs you had like python. The system will look for programs at the start of the $PATH variable before the miniconda3/bin folder. It will probably look like this (miniconda path before everything else): /home/your_user/miniconda3/bin:$PATHĬopy that path to the bottom of your ~/.bashrc file, but with Miniconda at the end instead of the beginning of the path like so: export PATH="$PATH:/home/your_user/miniconda3/bin" This worked for me but for Miniconda, it should also work for Anaconda but please correct me if I'm wrong.įirst get your $PATH variable: echo $PATH On the other hand, for better portability #!/usr/bin/env python is sometimes used, which will now cause python3.5 to be called. If the shebang #!/usr/bin/python is used, like it probably is in all executables that ship with Ubuntu, nothing will change. The ramifications of having python->python3 in your path depend on how a specific script is called. That way, calling python3 will start the one from Anaconda.Īn important point is, that the original /usr/bin/python is still there, and still points to python2.7.
![python to 2.7.3 to 2.7.9 python to 2.7.3 to 2.7.9](https://i.stack.imgur.com/Ho7qf.png)
![python to 2.7.3 to 2.7.9 python to 2.7.3 to 2.7.9](https://img2018.cnblogs.com/blog/396477/201907/396477-20190722122340964-1928467218.png)
bashrcĪs you suggest, you could alias python=python2, but I find that a bit weird. To restore the old behavior, go to your home directory and do mv. Prepending PATH=/home/myuser/anaconda3/bin to PATH in /home/myuser/.bashrcĪ backup will be made to: /home/myuser/.bashrc-anaconda3.bak
Python to 2.7.3 to 2.7.9 install#
Default is /home/myuser/anaconda3.Īt the end you'll be asked Python 3.5.1 :: Continuum Analytics, Inc.ĭo you wish the installer to prepend the Anaconda3 install location