want to create a python 3.6 environment. Below are the commands I executed and the output, but as you can see, the last python version shows 2.7. Why is this? I re-exit the terminal, re-enter, still 2.7 version
(base) :~/workspace/gem5$ conda create -n rcnn python=3.6
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /home/cuiyujie/anaconda3/envs/rcnn
added / updated specs:
- python=3.6
The following packages will be downloaded:
package | build
---------------------------|-----------------
certifi-2016.2.28 | py36_0 214 KB http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
pip-9.0.1 | py36_1 1.7 MB http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
python-3.6.2 | 0 31.5 MB http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
setuptools-36.4.0 | py36_1 534 KB http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
wheel-0.29.0 | py36_0 129 KB http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
wincertstore-0.2 | py36_0 14 KB http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
------------------------------------------------------------
Total: 34.1 MB
The following NEW packages will be INSTALLED:
certifi anaconda/pkgs/free/win-64::certifi-2016.2.28-py36_0
pip anaconda/pkgs/free/win-64::pip-9.0.1-py36_1
python anaconda/pkgs/free/win-64::python-3.6.2-0
setuptools anaconda/pkgs/free/win-64::setuptools-36.4.0-py36_1
vc anaconda/pkgs/free/win-64::vc-14-0
vs2015_runtime anaconda/pkgs/free/win-64::vs2015_runtime-14.0.25420-0
wheel anaconda/pkgs/free/win-64::wheel-0.29.0-py36_0
wincertstore anaconda/pkgs/free/win-64::wincertstore-0.2-py36_0
Proceed ([y]/n)? y
Downloading and Extracting Packages
python-3.6.2 | 31.5 MB | ################################################################################################################################ | 100%
wheel-0.29.0 | 129 KB | ################################################################################################################################ | 100%
setuptools-36.4.0 | 534 KB | ################################################################################################################################ | 100%
certifi-2016.2.28 | 214 KB | ################################################################################################################################ | 100%
wincertstore-0.2 | 14 KB | ################################################################################################################################ | 100%
pip-9.0.1 | 1.7 MB | ################################################################################################################################ | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate rcnn
#
# To deactivate an active environment, use
#
# $ conda deactivate
(base) :~/workspace/gem5$ conda activate rcnn
(rcnn) :~/workspace/gem5$ python --version
Python 2.7.12
(rcnn) :~/workspace/gem5$
At the end of my .bashrc
is export PATH="/home/cuiyujie/anaconda3/bin:$PATH"
. This shows that the path of my anaconda is put to the front, but when I use echo $PATH
, the output is /home/cuiyujie/bin:/home/cuiyujie/.local/bin:/home/cuiyujie/anaconda3/bin:/home/cuiyujie /anaconda3/condabin:/usr/local/sbin:
. Why did Anaconda run behind again?
When I use the export PATH="/home/cuiyujie/anaconda3/bin:$PATH
command directly in the terminal.
echo $PATH is
/home/cuiyujie/anaconda3/bin:/home/cuiyujie/bin:/home/cuiyujie/.local/bin:/home/cuiyujie/anaconda3/bin:/home/cuiyujie/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/arm_4.4.3/bin
I tried the conda command again and checked the python version
(base) :~$ conda activate rcnn
(rcnn) :~$ python --version
Python 3.8.5
The version is 3.85, which is the same as the built-in version, not the 3.6 I created
(rcnn) :~$ which python
/home/cuiyujie/anaconda3/bin/python
(rcnn) :~$ echo $PATH
/home/cuiyujie/anaconda3/envs/rcnn/bin:/home/cuiyujie/bin:/home/cuiyujie/.local/bin:/home/cuiyujie/anaconda3/bin:/home/cuiyujie/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/arm_4.4.3/bin
I am using the linux version. I am sure I downloaded the Linux version.Anaconda3-2020.07-Linux-x86_64.sh
But I entered the package of the environment I created, which contained .ddl and exe files, which was so strange. I uninstalled and reinstalled it several times. But Anaconda is the linux version, and the created environment is the window version.