-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the PyCodes wiki!
Install python modules...HOW???...
If you want a complete py modules for you idle. You can install
If you use Ubuntu or Debian Linux you may also be able use the systems package manager:sudo pip install module-name
Make sure you have Python updated, because it ships with pip. If pip is not available and you use Python > 3.4+, just run the command: >>py -3 -m ensurepipsudo apt install python3-pip sudo apt install python-pip
---You can check your version with the command python --version
To install pip on Apple Mac OS X, open up a terminal. Then download the get-pip.py installation file with curl ---curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py You can then run the installation script: ---python get-pip.py That’s it, pip is now installed.older versions of Python
For older versions of Python, it’s recommended that you upgrade instead of work with a legacy version of Python. If you insist, download the install script and place it in your Python directory. Then run it with
python get-pip.py
To do this, you need an administrator command prompt.
We can create a virtual environemnt, that is seperate from the operating system. This allows you to use the same Python modules as other developers in your team.Create a virtual environment with the line:
virtualenv foo Then open /foo/
cd /foo/ You now have 3 directories: bin, include and lib. Move up a directory.
To activate the virtual environment type:
source foo/bin/activate we can then install any module, any version we want - without affecting the operating system. This way we can have the same version of modules as other developers.
Note: Pip will now install for this environment only. pip install To exit the virtual environment write:
deactivate