Python Forum

Full Version: How to install a library in Python?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everyone, i'm really very new to Python. I have a maybe simple question:
How could i install a library in Python 3.x? My OS is Windows 7.

Thank you all.
If you look at Python 3.6 and pip installation under Windows | Part-2.
You see in last part that i test pip.
pip is a package management system used to install and manage software packages written in Python.

So it comes with Python and shall work from anywhere in cmd.
Example start cmd.
Microsoft Windows [Version 10.0.16299.371]
(c) 2017 Microsoft Corporation. Med enerett.

C:\WINDOWS\system32>cd\

C:\>pip -V
pip 10.0.1 from c:\python36\lib\site-packages\pip (python 3.6)

C:\>pip install lxml
Collecting lxml  
mypy 0.560 has requirement psutil<5.5.0,>=5.4.0, but you'll have psutil 5.3.1 which is incompatible.
Installing collected packages: lxml
Successfully installed lxml-4.2.1

C:\>python
Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from lxml import html, etree
>>>
>>> etree.__version__
'4.2.1'
Thank you so much@snippsat. It's very clear and i've solved my issues.
I used the method you recommended here: https://python-forum.io/Thread-Basic-Par...er-Windows.

Now i can move on. Thank you!