Problem Formulation: Given a PyCharm project. How to install a library in your project within a virtual environment or globally?
Solution that always works:
- There are two nice ways to install Python packages on Ubuntu (and similar Linux systems): sudo apt-get install python-pygame. To use the Debian/Ubuntu package manager APT. This only works for packages that are shipped by Ubuntu, unless you change the APT configuration, and in particular there seems to be no PyGame package for Python 3.
- Most Linux platforms come with some version of lxml readily packaged, usually named python-lxml for the Python 2.x version and python3-lxml for Python 3.x. If you can use that version, the quickest way to install lxml is to use the system package manager, e.g. Apt-get on Debian/Ubuntu: sudo apt-get install python3-lxml.
- Open
File > Settings > Project
from the PyCharm menu. - Select your current project.
- Click the
Python Interpreter
tab within your project tab. - Click the small
+
symbol to add a new library to the project. - Now type in the library to be installed, for example Pandas, and click
Install Package
. - Wait for the installation to terminate and close all popup windows.
Here’s the installation process as a short animated video:
Install OpenSSL Python Library with Pip We can use pip install for all Linux distributions like Ubuntu, Debian, Mint, Kali, Fedora, CentOS, RedHat, etc. We can also install OpenSSL Python Library in Windows Operating systems Windows 7, Windows 8, Windows 10, Windows Server 2008, Windows Server 2012, Windows Server 2016.
Install Python Library Linux
While working as a researcher in distributed systems, Dr. Christian Mayer found his love for teaching computer science students.
Install Python Library In Pycharm
To help students reach higher levels of Python success, he founded the programming education website Finxter.com. He’s author of the popular programming book Python One-Liners (NoStarch 2020), coauthor of the Coffee Break Python series of self-published books, computer science enthusiast, freelancer, and owner of one of the top 10 largest Python blogs worldwide.
His passions are writing, reading, and coding. But his greatest passion is to serve aspiring coders through Finxter and help them to boost their skills. You can join his free email academy here.