According to the comments this using gnu/linux, according to the FHS (Filesystem Hierarchy Standard) structure /usr/bin/ contains only non-essential files (which are not required for the system to work or for its recovery). or is not necessary to be root to access.
installing :
sudo apt-get install python3 python3-setuptools python3-pkg-resources \
python3-pip python3-dev libffi-dev build-essential git
pip install virtualenv
pip install virtualenvwrapper
The python sits there:
/usr/bin$ py
py3clean pydoc2.7 pygettext3 python3
py3compile pydoc3 pygettext3.8 python3.8
py3versions pydoc3.8 pygettext3.9 python3.8-config
pyclean pydoc3.9 pyjwt3 python3.9
pycompile pygettext2 python2 python3-config
pydoc2 pygettext2.7 python2.7 pyversions
so if you want to use python 2 or 3..
just enter the right one with the version you need:
/usr/bin/python2.7
If the goal is to standardize a version for use in a virtual environment, try specifying the bashrc to run every time you start.
configuring, on the last line :
:~$ cat .bashrc
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python_versao_atual #usar essa versão
export WORKON_HOME=~/.vitualenvs # no ambiente
source /usr/local/bin/virtualenvwrapper.sh # gestor de ambiente
I consider virtualenv easy to use and create environments for different versions of python.
to create environments:
mkvirtualenv -p /usr/bin/python2.7 ambiente27
to use the version created
workon ambiente27
the location where the created versions are located is:
:~$ ls .vitualenvs/
For what you wrote this wanting to use python "3.6.0rc2" This acronym RC2 means release candidate a candidate who is the second time to be a release candidate. is not a final version just a candidate.
You can install this version if you have confidence in its purpose, it will be in /usr/bin
The idea is to install a current python version and use a virtual environment manager. If you want to use an old version just install and use virtualenv to manage them be the version you want.
If it doesn’t help you, just re-inform the result
Apparently to use Pip I need sudo or su, but when I try to use either one of the two appears saying that the command does not exist but when I try without sudo it exists (but does not install)
– Rodrigo Damasceno
I’ve had this problem before, it can solve by configuring your
PATH
, if thepip
is in/usr/local/bin
or if thePATH
user and root are different will not appear (some distros commands in/sbin
and/usr/sbin
do not appear for normal users). Or try logging directly as root by terminal mode.– Brumazzi DB
The root and user path are no different (I tried to give sudo echo $PATH if I made a silly mistake), but Pip is from /usr/local/bin, which I do ?
– Rodrigo Damasceno
I added how to configure the
PATH
of linux, is thePATH
that I use, thanks to it I never had problems in not finding any command with any user.– Brumazzi DB
OK I did that and sudo still does not recognize pip3.6
– Rodrigo Damasceno
logs in direct as root from terminal mode
– Brumazzi DB