Installing python modules on Ubuntu

后端 未结 5 931
轻奢々
轻奢々 2020-12-08 11:45

I need to install some modules for python on Ubuntu Linux 12.04. I want pygame and livewires but I\'m not sure how to install them.

I have the py file for livewire

5条回答
  •  忘掉有多难
    2020-12-08 12:01

    You can use several approaches:

    1 - Download the package by yourself. This is what I use the most. If the package follows the specifications, you should be able to install it by moving to its uncompressed folder and typing in the console:

    python setup.py build
    python setup.py install
    

    2 - Use pip. Pip is pretty straightforward. In the console, you have to type:

    pip install package_name
    

    You can obtain pip here https://pypi.python.org/pypi/pip and install it with method 1

    One thing to note: if you aren't using a virtualenv, you'll have to add sudo before those commands (not recommended)

提交回复
热议问题