🔰 INSTALL PYTHON IN TERMUX AND SETUP A VIRTUAL ENVIRONMENT 🔰
In Termux default python version is python3.
🌀 ᴛᴏ ɪɴsᴛᴀʟʟ ᴘʏᴛʜᴏɴ3
$
🌀 ᴛᴏ ᴄʜᴇᴄᴋ ᴘʏᴛʜᴏɴ ᴠᴇʀsɪᴏɴ ɪɴsᴛᴀʟʟᴇᴅ ɪɴ ʏᴏᴜʀ ᴛᴇʀᴍᴜx
$
Python has 'pip' as default package manager to manage python packages.
Using pip you can install, update, remove python packages in a simple and easy way.
We will discuss more on pip in the upcoming posts but for now let's see how to confirm if pip is installed properly or not.
🌀 ᴛᴏ ᴄʜᴇᴄᴋ ᴘɪᴘ ᴠᴇʀsɪᴏɴ ɪɴsᴛᴀʟʟᴇᴅ ɪɴ ʏᴏᴜʀ ᴛᴇʀᴍᴜx
$
Python virtual environments are a sweet way to manage several projects and their dependencies on a single machine.
The packages installed in a virtual environment are accessible only inside that environment and thus allows different versions of same package to be installed and managed.
🌀 ᴛᴏ ᴄʀᴇᴀᴛᴇ ᴀ ᴘʏᴛʜᴏɴ ᴠɪʀᴛᴜᴀʟ ᴇɴᴠɪʀᴏɴᴍᴇɴᴛ
$
where 'mypythonenv' is the the name of your environment. You can name it anything you want.
You can use your virtual environment by activating it. Then after finishing your work you can deactivate it.
🌀 ᴛᴏ ᴀᴄᴛɪᴠᴀᴛᴇ ʏᴏᴜʀ ᴠɪʀᴛᴜᴀʟ ᴇɴᴠɪʀᴏɴᴍᴇɴᴛ
$
🌀 ᴛᴏ ᴅᴇᴀᴄᴛɪᴠᴀᴛᴇ ʏᴏᴜʀ ᴠɪʀᴛᴜᴀʟ ᴇɴᴠɪʀᴏɴᴍᴇɴᴛ
$
If you enjoyed reading this post, don't forget to
LIKE 👍 | SHARE ♥️
◆━━━◆❃ @PYTHONGRAMM ❃◆━━━◆
In Termux default python version is python3.
🌀 ᴛᴏ ɪɴsᴛᴀʟʟ ᴘʏᴛʜᴏɴ3
$
pkg install python
🌀 ᴛᴏ ᴄʜᴇᴄᴋ ᴘʏᴛʜᴏɴ ᴠᴇʀsɪᴏɴ ɪɴsᴛᴀʟʟᴇᴅ ɪɴ ʏᴏᴜʀ ᴛᴇʀᴍᴜx
$
python --version
Python has 'pip' as default package manager to manage python packages.
Using pip you can install, update, remove python packages in a simple and easy way.
We will discuss more on pip in the upcoming posts but for now let's see how to confirm if pip is installed properly or not.
🌀 ᴛᴏ ᴄʜᴇᴄᴋ ᴘɪᴘ ᴠᴇʀsɪᴏɴ ɪɴsᴛᴀʟʟᴇᴅ ɪɴ ʏᴏᴜʀ ᴛᴇʀᴍᴜx
$
pip --version
Python virtual environments are a sweet way to manage several projects and their dependencies on a single machine.
The packages installed in a virtual environment are accessible only inside that environment and thus allows different versions of same package to be installed and managed.
🌀 ᴛᴏ ᴄʀᴇᴀᴛᴇ ᴀ ᴘʏᴛʜᴏɴ ᴠɪʀᴛᴜᴀʟ ᴇɴᴠɪʀᴏɴᴍᴇɴᴛ
$
python -m venv mypythonenv
where 'mypythonenv' is the the name of your environment. You can name it anything you want.
You can use your virtual environment by activating it. Then after finishing your work you can deactivate it.
🌀 ᴛᴏ ᴀᴄᴛɪᴠᴀᴛᴇ ʏᴏᴜʀ ᴠɪʀᴛᴜᴀʟ ᴇɴᴠɪʀᴏɴᴍᴇɴᴛ
$
source mypythonenv/bin/activate
🌀 ᴛᴏ ᴅᴇᴀᴄᴛɪᴠᴀᴛᴇ ʏᴏᴜʀ ᴠɪʀᴛᴜᴀʟ ᴇɴᴠɪʀᴏɴᴍᴇɴᴛ
$
deactivate
If you enjoyed reading this post, don't forget to
LIKE 👍 | SHARE ♥️
◆━━━◆❃ @PYTHONGRAMM ❃◆━━━◆
🔰 MANAGING PACKAGES WITH PIP IN PYTHON IN TERMUX 🔰
🌀 ᴛᴏ ɪɴsᴛᴀʟʟ ʟᴀᴛᴇsᴛ ᴠᴇʀsɪᴏɴ ᴏғ ᴀ ᴘᴀᴄᴋᴀɢᴇ
$
➤ For example,
$
🌀 ᴛᴏ ɪɴsᴛᴀʟʟ ᴀ sᴘᴇᴄɪғɪᴄ ᴠᴇʀsɪᴏɴ ᴏғ ᴀ ᴘᴀᴄᴋᴀɢᴇ
$
➤ For example,
$
🌀 ᴛᴏ ᴜᴘɢʀᴀᴅᴇ ᴀ ᴘᴀᴄᴋᴀɢᴇ ᴛᴏ ᴛʜᴇ ʟᴀᴛᴇsᴛ ᴠᴇʀsɪᴏɴ
$
➤ For example,
$
🌀 ᴛᴏ ᴜɴɪɴsᴛᴀʟʟ ᴀ ᴘᴀᴄᴋᴀɢᴇ
$
➤ For example,
$
🌀 ᴛᴏ ᴅɪsᴘʟᴀʏ ɪɴғᴏʀᴍᴀᴛɪᴏɴ ᴀʙᴏᴜᴛ ᴀ ᴘᴀʀᴛɪᴄᴜʟᴀʀ ᴘᴀᴄᴋᴀɢᴇ
$
➤ For example,
$
🌀 ᴛᴏ ʟɪsᴛ ᴀʟʟ ᴏғ ᴛʜᴇ ᴘᴀᴄᴋᴀɢᴇs ɪɴsᴛᴀʟʟᴇᴅ ɪɴ ᴛʜᴇ ᴠɪʀᴛᴜᴀʟ ᴇɴᴠɪʀᴏɴᴍᴇɴᴛ
$
🌀 ᴛᴏ ᴘʀᴏᴅᴜᴄᴇ ᴀ sɪᴍɪʟᴀʀ ʟɪsᴛ ᴏғ ᴛʜᴇ ɪɴsᴛᴀʟʟᴇᴅ ᴘᴀᴄᴋᴀɢᴇs, ʙᴜᴛ ᴇxᴘᴏʀᴛ ɪᴛ ᴀs ʀᴇϙᴜɪʀᴇᴍᴇɴᴛs.ᴛxᴛ ғɪʟᴇ
$
This file is distributed as part of the application as dependencies or required packages for that particular application.
🌀 ᴛᴏ ɪɴsᴛᴀʟʟ ᴘᴀᴄᴋᴀɢᴇs ʟɪsᴛᴇᴅ ɪɴ ʀᴇϙᴜɪʀᴇᴍᴇɴᴛs.ᴛxᴛ ғɪʟᴇ
$
If you enjoyed reading this post, don't forget to
LIKE 👍 | SHARE ♥️
◆━━━◆❃ @PYTHONGRAMM ❃◆━━━◆
🌀 ᴛᴏ ɪɴsᴛᴀʟʟ ʟᴀᴛᴇsᴛ ᴠᴇʀsɪᴏɴ ᴏғ ᴀ ᴘᴀᴄᴋᴀɢᴇ
$
pip install {package name}
➤ For example,
$
pip install requests
🌀 ᴛᴏ ɪɴsᴛᴀʟʟ ᴀ sᴘᴇᴄɪғɪᴄ ᴠᴇʀsɪᴏɴ ᴏғ ᴀ ᴘᴀᴄᴋᴀɢᴇ
$
pip install {package name}=={version number}
➤ For example,
$
pip install requests==2.6.0
🌀 ᴛᴏ ᴜᴘɢʀᴀᴅᴇ ᴀ ᴘᴀᴄᴋᴀɢᴇ ᴛᴏ ᴛʜᴇ ʟᴀᴛᴇsᴛ ᴠᴇʀsɪᴏɴ
$
pip install --upgrade {package name}
➤ For example,
$
pip install --upgrade requests
🌀 ᴛᴏ ᴜɴɪɴsᴛᴀʟʟ ᴀ ᴘᴀᴄᴋᴀɢᴇ
$
pip uninstall {package name}
➤ For example,
$
pip uninstall requests
🌀 ᴛᴏ ᴅɪsᴘʟᴀʏ ɪɴғᴏʀᴍᴀᴛɪᴏɴ ᴀʙᴏᴜᴛ ᴀ ᴘᴀʀᴛɪᴄᴜʟᴀʀ ᴘᴀᴄᴋᴀɢᴇ
$
pip show {package name}
➤ For example,
$
pip show requests
🌀 ᴛᴏ ʟɪsᴛ ᴀʟʟ ᴏғ ᴛʜᴇ ᴘᴀᴄᴋᴀɢᴇs ɪɴsᴛᴀʟʟᴇᴅ ɪɴ ᴛʜᴇ ᴠɪʀᴛᴜᴀʟ ᴇɴᴠɪʀᴏɴᴍᴇɴᴛ
$
pip list
🌀 ᴛᴏ ᴘʀᴏᴅᴜᴄᴇ ᴀ sɪᴍɪʟᴀʀ ʟɪsᴛ ᴏғ ᴛʜᴇ ɪɴsᴛᴀʟʟᴇᴅ ᴘᴀᴄᴋᴀɢᴇs, ʙᴜᴛ ᴇxᴘᴏʀᴛ ɪᴛ ᴀs ʀᴇϙᴜɪʀᴇᴍᴇɴᴛs.ᴛxᴛ ғɪʟᴇ
$
pip freeze > requirements.txt
This file is distributed as part of the application as dependencies or required packages for that particular application.
🌀 ᴛᴏ ɪɴsᴛᴀʟʟ ᴘᴀᴄᴋᴀɢᴇs ʟɪsᴛᴇᴅ ɪɴ ʀᴇϙᴜɪʀᴇᴍᴇɴᴛs.ᴛxᴛ ғɪʟᴇ
$
pip install -r requirements.txt
If you enjoyed reading this post, don't forget to
LIKE 👍 | SHARE ♥️
◆━━━◆❃ @PYTHONGRAMM ❃◆━━━◆
Join our python community for absolute newbies🔥
Show your love ❤️
👉 www.tg-me.com/pythongramm
👉 www.tg-me.com/pythongroupp
Show your love ❤️
👉 www.tg-me.com/pythongramm
👉 www.tg-me.com/pythongroupp
Forwarded from Artificial Intelligence (Artificial Intelligence)
Python 3.9 released today with lot of new features. Check the official docs compared to it's previous version.
https://docs.python.org/3.9/whatsnew/3.9.html
https://docs.python.org/3.9/whatsnew/3.9.html