Skip to content Skip to sidebar Skip to footer

How To Add/use Libraries In Python (3.5.1)

I've recently been playing around with python and have now expanded into doing stuff like scraping through websites and other cool stuff and I need to import new libraries for thes

Solution 1:

python 3.5 comes with pip already, to install something with it, open a cmd and do python -m pip install library to install your desire library and if you want the help on the command do python -m pip --help

Solution 2:

if u have or you can create a file requirements.txt which contains the libraries that you want to install for ex:

numpy==1.14.2Pillow==5.1.0

You gonna situate in your folder which contains that requirements.txt in my case the path to my project is

C:\Users\LE\Desktop\Projet2_Sig_Exo3\exo 3\k-means

now just type

python -m pip install -r ./requirements.txt

and all the libararies that you want gonna install

C:\Users\LE\Desktop\Projet2_Sig_Exo3\exo 3\k-means>python -m pip install -r ./requirements.txt

Post a Comment for "How To Add/use Libraries In Python (3.5.1)"