Python virtual environment and configuration under Linux

Source: Internet
Author: User
Tags save file virtual environment virtualenv

    1. sudo apt-get install python-virtualenv
    2. Virtualenv Py2
    3. CD Py2
    4. CD bin
    5. Start the virtual environment: source Activate
    6. Deactivate
    7. Virtualenv-p/usr/bin/pyhon3 Py3
    8. CD Py3
    9. CD bin
    10. SOURCE Activate

    1. Pip Install Virtualenvwrapper
    2. Find virtualenvwrapper.sh script sudo find/-name virtualenvwrapper.sh
    3. Copy path
    4. VI ~/.BASHRC last line add
    5. Export Workon_home= $HOME/.virtualenvs
    6. SOURCE/Path
    7. Save File: Wq
    8. SOURCE ~/BASHRC
    9. Mkvirtualenv py2scrapy
    10. Ls
    11. CD ~/.virtualenvs
    12. Ls
    13. Deactivate
    14. Workon
    15. Mkvirtualenv--python=/usr/bin/python3 Py3scrapy
    16. Python
    17. Deactivate

Python virtual environment and configuration under Linux

Related Article

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.