Where is the default version of python to launch by typing python3 in the console?
For example, in an environment where 3.6 is installed
apt install python3.7
I also installed 3.7 with python3.6 and python3.7,
When python3.6 starts by default.
Nothing is specified in .bashrc.What I confirmed
- Explicitly specify python3.7 to start 3.7
- Windows 10 + WSL2 (Ubuntu-18.04)
- Installed python3 version: python3.6, python3.7
- VSCode: 1.51.1
Answer # 1
>Where is the minor version number of python that starts by default specified?
Nothing is specified in .bashrc.
It is not specified.
The entity when running python is
which pythonYou can check with.
Similarly for python 3.7
which python3.7You can check with
If you are forced to specify it, the environment variable
PATHYou don't have to hit with a full pass because you have set
Answer # 2
Since python3 is a symbolic link, there are many places to install it, so first check which python3 is running.
which python3Let's check with.
What is the entity of python3 being executed?
ls -l full path to python3 aboveIn can be confirmed.
After all, which python3 is executed is determined by the path search order of the shell, so if you look at the contents of ~/.bashrc and ~/.bash_profile, the "criminal" who controls the execution order is I understand. In addition, it is difficult to find the "black curtain" of why this "criminal" is happening because it changes depending on the past installation order and installation method of python.
The situation becomes even more complicated when using a python virtual environment.
Answer # 3
Although it is a debian environment
$cd/usr/bin / / user/bin $ls -l python3 >python3->python3.7
Should be displayed (3.7 in my case)
This will be the python version associated with python3
- no matter how many times the python version is used, it will return to 2716 the next time i use it
- python - [ubuntu20041] pip version does not go up
- python - when you want to judge by the number of characters from the back with a regular expression
- python - how to get the number of searches for a specific word within the period
- python - sumy by specifying the maximum number of characters with sumy
- python - i want to add a line number to the data frame
- number of python combinations
- python - i want to remodel line is there a line version of the google extension?
- where to write timesleep in python scraping
- python 3x - i want to output the name corresponding to the number entered in the excel file
- i want to change the default version of python
- python - i want to divide a binary number into two, store it in a list, and represent it in a different decimal number
- i want to invert the number 12345 in python like 54321 and display it
- python - i want to generate a button where i clicked
- aurora db mysql version db number limit
- get the number of characters from the python text box
- get the total number and name of python grouping
- how to align the number of elements with overlaplengt of python etc
- i want to display python3 when executing python --version on centos7