python venv

Categories

to install a module like numpy just:
sudo apt install python3-numpy

to run modules:
python3 -m http.server
this will creates an http server

to create a virtual environment (because it would be better to use a venv than using system python and install your modules on system)
pyton3 -m venv <name of venv or the path usually named venv>

or if you do not have it:
sudo at install python3-venv

source venv/bin/activate

to use python instead of every time typing python3 :
sudo apt install python-is-python3

pip freeze > requirements.txt
to create a requirements file to install easily.
pip install -r requirements.txt

pip install pipdeptree
to install just the heading modules.

pylint to score your python file

black to reformat the file.py

Leave a comment

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.