+ 1
How to install packages?
I want to install packages onto Python eg pygame but I'm not sure how. I've already tried pip but when I tried to use pip it wouldn't work. can someone help please?
4 Answers
+ 3
Man, download the great Czech software PyCharm and forget about problems with installing modules. Really works like a... (py)charm! ;)
+ 1
Another 'module' instalation tool like 'pip' is 'easy_install': you could try it...
If you are on Linux Debian based, some modules are instalable by aptitude tools: try a research with them... ( on Ubuntu based Linux, you may find some in their deposit system ).
+ 1
I usually make a virtual environment of my python install for each project or set of projects so as not to mess with my main installation of python on my machine. Then install packages into that new virtual environment (venv) using pip.
create a venv and then make it active for the terminal.
$ pip install virtualenv
$ cd my_project_folder
$ virtualenv venv
$ source venv/bin/activate
More info on venvs
http://docs.python-guide.org/en/latest/dev/virtualenvs/
More info on using pip.
https://packaging.python.org/installing/
You may need to install or update setuptools.
$ pip install -U setuptools
You may need to update your version of pip.
$ pip install --upgrade pip
Using pip to install pygame.
$ pip install pygame
Note that any of the above instructions may change slightly depending on what Operating System you're on and your user privileges. You may need to use the sudo command as well.
+ 1
As @ChaoticDawg suggested, "you may need to use the sudo command as well": if you are unde linux system, module often required running under super user rights to be able to write on some files / folder ( directories ) ^^