Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing python modules in GNU/Linux

installing python modules in GNU/Linux. Are there any good PDFs on installing modules? I would like to install some of these Python: 50 modules for all needs. I tried PIL http://effbot.org/downloads/Imaging-1.1.7.tar.gz but it did not work.

PS: what does community wiki mean?

like image 465
hidroto Avatar asked Dec 16 '25 19:12

hidroto


1 Answers

Most of those are probably already available as packages in your Linux distribution. You didn't mention which one you used. Typically, "apt-get" or "yum" would cover most current distributions. Read the man pages for those tools, and use the search features to find packages containing the name "python", or the names of the packages in the list.

If the one you want is not there, install "setuptools", then use "easy-install" to fetch them from the Python package index (PyPI).

Only if the above fail you should build from source. That will require a build environment, typically involving installing "dev" or "development" packages, e.g "python-dev" on some distros. You may also need some other library -dev packages.

Once you have the required development packages installed, the distutils (or setuptools) standard method to build from source should be used.

The command

$ python setup.py build

should work. If it doesn't you may need more -dev packages. Check the error messages.

If it does build, then use "sudo python setup.py install" to install it.

Without more info, it's hard to give a more specific answer.

like image 95
Keith Avatar answered Dec 19 '25 07:12

Keith



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!