Virtual environments are an essential tool for Python developers to manage dependencies and isolate projects. In this article, we will explore the basics of virtual environments and how to use them effectively. What are Virtual Environments? Virtual environments are isolated Python environments that allow you to install and manage dependencies for a particular project without affecting other projects or the system Python installation. Each virtual environment has its own Python
python
Pyenv install and ussage
Install $ sudo apt-get install -y build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python3-openssl git$ curl https://pyenv.run | bash If we are using ZSH then we will now add the proper lines to our .zshrc. $ echo ‘export PYENV_ROOT=»$HOME/.pyenv»‘ >> ~/.zshrc$ echo ‘export PATH=»$PYENV_ROOT/bin:$PATH»‘ >> ~/.zshrc$ echo -e ‘if command -v pyenv 1>/dev/null 2>&1; then\n eval «$(pyenv init -)»\nfi’ >> ~/.zshrc Restart
(Solution) Change python default version (Kali linux)
kali@kali:/bin$ update-alternatives –list python kali@kali:/bin$ sudo update-alternatives –install /usr/bin/python python /usr/bin/python2.7 1 kali@kali:/bin$ sudo update-alternatives –install /usr/bin/python python /usr/bin/python3.7 2 kali@kali:/bin$ sudo update-alternatives –install /usr/bin/python python /usr/bin/python3.8 3 kali@kali:/bin$ sudo update-alternatives –config python Finally test everything is ok.
(Solution) Install python-pip in Kali Linux
ruben@kali:/etc/apt$ sudo apt search python-pip ruben@kali:/etc/apt$ sudo apt search python3-pip ruben@kali:/etc/apt$ sudo apt install python3-pip Downloading the specific package and installing with dkpg can solve also the issue. https://packages.debian.org/buster/all/python-pip/download