odrelop.blogg.se

Python install package
Python install package












python install package

You will notice below that I use commands like python3.9 or python3.8 and not simply python3.

python install package

I will also say that when creating your virtual environment you should always do it by specifying the specific version of Python that you want. So please, always use some form of isolated environment (I will be using virtual environments because they are built into Python itself, they are lightweight, and VS Code has great support for them 😁).

python install package

Thanks to Python being widely used to run operating sytems now you can actually break your OS if you install directly into your global interpreter. You want this because you want to isolate what you install from your global Python installation. The first step is creating a virtual environment. Details Step 1: Create a virtual environment This post also covers versions of step 2 for other shells. python -m pip install -upgrade pip if you wanted to install the latest version of pip (which you probably do)ĭo note that there is a fancier version of step 1 explained below. venv/bin/activate.fish (assuming you are using the fish shell) Activate the virtual environment, e.g.venv (substitute py -3.8 for python3.8 if necessary) If you just want to start poking at Python and want to avoid the pitfalls to installing packages globally, it only takes 3 steps to do the right thing. And while there is a tutorial on installing packages at, it might be a bit intimidating for some if they are just looking to quickly get up and going. When people start learning Python, they often will come across a package they want to try and it will usually start with "just pip install it!" The problem with that advice is it's a very simplistic view of how to manage packages and can actually lead to problems down the road.














Python install package