Python – Install python modules in GNU/Linux

Install python modules in GNU/Linux… here is a solution to the problem.

Install python modules in GNU/Linux

Install python modules in GNU/Linux. Is there a good PDF on installing modules? I want to install some of them Python: 50 modules for all needs http://effbot.org/downloads/Imaging-1.1.7.tar.gz but it didn’t work.

PS: What does community wiki mean?

Solution

Most of these may already be available as packages in your Linux distribution. You didn’t mention which one you used. Usually, “apt-get” or “yum” will cover most current releases. Read the man pages for these tools and use the search function to find packages that contain the name “python” or package names in the list.

If the one you want doesn’t exist, install “setuptools” and use “easy-install” to get them from the Python Package Index (PyPI).

You should only build from source only if the above method fails. This will require a build environment, which usually involves installing “development” or “development” packages, such as “python-dev” on some distributions. You may also need some other library -dev packages.

After installing the required development packages, you should build from source using the distutils (or setuptools) standard method.

Command

$ python setup.py build

It should be ok. If not, you may need more -dev packages. Check the error message.

If it does build, then install it using “sudo python setup.py install”.

Without more information, it is difficult to give a more specific answer.

Related Problems and Solutions