Python Forum
How to install a library in Python?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to install a library in Python?
#1
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.
Reply
#2
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'
Reply
#3
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!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Install any library via pip get an error cannot import name 'SCHEME_KEYS' from 'pip. Anldra12 2 10,656 Jan-04-2022, 01:05 PM
Last Post: Anldra12
  I cannot install this library. Can someone show me how? Led_Zeppelin 8 5,895 Mar-12-2021, 05:17 PM
Last Post: snippsat
  Can't install Lcapy library Sancho_Pansa 6 2,765 Oct-23-2020, 12:48 AM
Last Post: Larz60+
  PyInstaller, how to create library folder instead of library.zip file ? harun2525 2 4,813 May-06-2017, 11:29 AM
Last Post: harun2525

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020