Python 2 and Python 3 Coexistence Solutions (VIRTUALENV) __python

Source: Internet
Author: User
Tags virtual environment virtualenv


Install the Virtualenv tool:

For WIN10:

1. Install Virtualenv

Win+r--> cmd--> pip install virtualenv are as follows:

C:\users\thinkpad>pip Install virtualenv
collecting virtualenv
  downloading VIRTUALENV-15.1.0-PY2.PY3-NONE-ANY.WHL (1.8MB)
    100% |████████████████████████████████| 1.8MB 473kb/s
Installing collected packages:virtualenv
successfully installed virtualenv-15.1.0 you
are using PIP version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the ' python-m pip install--upgrade pip ' command.

C:\users\thinkpad>


2. Create Virtual space

1 Create a virtual environment for the Python2 workspace, D:\python\py27 is created automatically when the following command is executed, without having to manually create it in advance.

C:\users\thinkpad>virtualenv-p D:\python2\python.exe D:\python\py27
Running virtualenv with interpreter d:\ Python2\python.exe
New python executable in D:\python\py27\Scripts\python.exe
installing Setuptools, Pip, Wheel...done.

2 Create a virtual environment for the Python3 workspace, D:\python\py36 is created automatically when the following command is executed, without having to manually create it in advance.
C:\users\thinkpad>virtualenv-p C:\Users\ThinkPad\AppData\Local\Programs\Python\Python36-32\python.exe D:\ python\py36
Running virtualenv with interpreter C:\Users\ThinkPad\AppData\Local\Programs\Python\Python36-32\ Python.exe
Using base prefix ' c:\\users\\thinkpad\\appdata\\local\\programs\\python\\python36-32 '
New Python executable in D:\python\py36\Scripts\python.exe
installing Setuptools, Pip, Wheel...done.



http://blog.csdn.net/ybdesire/article/details/50486777





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.