4 ms·
Here are the definitive commands that will install a good version of Python, create a virtual environment (venv), install the necessary packages and command lin
by avip 4y ago
Here are the definitive commands that will install a good version of Python, create a virtual environment (venv), install the necessary packages and command line tools, set up the configuration correctly, and allow you to start coding:
Install a good version of Python:
# Install the latest version of Python 3
sudo apt update
sudo apt install python3
Create a virtual environment (venv) for your project:
# Create a virtual environment for your project
python3 -m venv my_project
# Activate the virtual environment
source my_project/bin/activate
Install the necessary packages and command line tools:
# Install the necessary packages and command line tools
pip install --upgrade pip
pip install setuptools wheel
pip install flake8 black isort
Set up the configuration for your project:
# Set up the configuration for your project
flake8 --install-hook git
black --install-hook git
isort --multi-line=3 --trailing-comma --force-grid-wrap=0 --combine-as --line-width 88 --recursive --thirdparty my_project
Start coding:
# Start coding in your project
cd my_project
nano my_project.py
This series of commands will install the latest version of Python 3, create a virtual environment for your project, install the necessary packages and command line tools, set up the configuration for your project, and allow you to start coding. I hope this helps. Let me know if you have any other questions.
- jerpint 4y agoThis is incredible (I’m assuming this was chatGPT output)
- ailef 4y agoI think this fails because you need to install python3-venv too (on Debian systems I believe). So then you're back looking it up on Google.
- deleted 4y ago[deleted]
- roywiggins 4y agoThere's good odds that if you responded "hey, I got an error about virtualenv being missing, what do I need to fix that?" it will suggest that. It's a genuine chat interface; if something isn't quite right, you can point that out and ask it to correct it, and it has good odds of understanding.