Python management tools under Linux

Source: Internet
Author: User
Tags virtual environment virtualenv

Just started to synchronize the system with Python and Linux, under the guidance of Hao sister learned to use the Python management tools, hoping to be able to learn through continuous proficiency

1. Review the following Linux common directories before recording

./indicates the current directory

~/represents the Home directory

folder or file before adding. Indicates a hidden folder or file, ls command cannot view hidden files, need to take parameter-a

2.python Management Pack

Python management tools more common Esay_install and pip,pip seem to be generally considered better, so we use Pip, online to find a comparison between the

Pip is originally written to improve on Easy_install in the following ways

  • all Packages is downloaded before installation. partially-completed installation doesn ' t occur as a result.
  • care was taken to present useful output on the console.
  • the reasons for actions is kept track of. For instance, if a, the is being installed, Pip keeps track of why, the package was required.
  • Error messages should be useful.
  • the code is relatively concise and cohesive, making it easier to use programmatically.
  • Packages don ' t has to be installed as egg archives, they can is installed flat (while keeping the egg metadata).
  • Native support for other version control systems (Git, Mercurial and Bazaar)
  • uninstallation of packages.
  • simple to define fixed sets of requirements and reliably reproduce a set of packages.
sudo apt-get Install Python-pip  

Install the PIP can be used, but the default PyPI source in the domestic speed is too slow, you can import Tsinghua PyPI source, or V2ex source. Then modify or add the configuration file: ~/.pip/pip.conf

Turn the content into:

[Global]index 6000

Then Pip's Common command

' [Name[==version]] '  -U [name]pip Uninstall [name]pip freezepip search [Keyword]pip Show [name]
3. Build a Python virtual environment

Virtualenv can be used to provide a pure Python environment, independent of each other, without dependencies, which can solve the issue of library version, dependencies and permissions. When you need to delete an app, you can delete the environment and the app's folders directly. Virtualenv can be understood as a Python environment for virtual machines. Detailed description please poke here

The installation of virtualenv is simple and can be installed directly using PIP:

Pip Install Virtualenv

Enter the directory and establish the virtual environment:

CD pythonenvvirtualenv pythonenv

To activate a virtual environment:

cd Pythonenvsourve bin/activatecd.

Well, has entered the pythonenv virtual environment, should also have (PYTHONENV) logo.

4. Download the Python open source package from GitHub

Python management tools under Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.