Build virtualenv, Virtualenvwrapper virtual environment under Windows

Source: Internet
Author: User
Tags virtual environment virtualenv
build virtualenv, virtualenvwrapper virtual environment under WindowsPublished in 2016-10-17 |   | Read Times 60

Operating system: Win7 virtualenv 1. Installation virtualenv

Pip Install Virtualenv

2. Create a new virtual environment

Virtualenv Bobbyvir

Note: 1. The virtual environment is located under the current command's directory here is E:\Projects\projectsedu.com
     2. The virtual environment name is Bobbyvir
3. Enter the virtual environment
1 Enter the virtual Environment directory: CD E:\Projects\projectsedu.com
2) into the script directory:     CD bobbyvir\scripts
2 run Activate.bat:  Activate.bat

To view the libraries that are installed by default in a virtual environment

PIP List

4. The virtual environment installs the development library, here takes the requests library as the reference

Pip Install request

5. Exit Virtualenv

Deactivate.bat

Virtualenvwrapper

Above each enter virtual we need to enter into the directory of virtualenv, once virtualenv too much, on the egg pain, then solemnly recommended Virtualenvwrapper 1. Install Virtualenvwrapper

Pip Install Virtualenvwrapper-win
Note: Run pip install under Linux virtualenvwrapper

Setting Work_home Environment variables

2. Create a new virtual environment

Mkvirtualenv Bobbyvir

Note: All virtual environments will be installed to E:\VIRTUALEVN because the previous step is set to Work_home
3. View all installed virtual Environments
Workon

Note: You cannot see the virtual environment created by virtualenv, you can only view the virtual environment created by mkvirtualenv
4. Enter the virtual environment
Workon Bobbyvir

5. Exit the virtual Environment

Deactivate

Did the little buddy feel so easy

Finally, you are welcome to watch my tutorial on Django + xadmin:

Http://coding.imooc.com/class/evaluation/78.html
Mysql-python installation Error under WindowsPublished in 2016-10-17 |   | Read Times 28

Windows install Python's MySQL drive is so easy:

Pip Install Mysql-python

But there was no surprise that something went wrong:

_MYSQL.C: Fatal error C1083:cannot open include file: ' Config-win.h ': No such file or directory
purple:

General installation operation above the artifact command will be wrong, even under Linux is also, directly on the solution:

To the http://www.lfd.uci.edu/~gohlke/pythonlibs/download the binary installation package
The website opens probably purple:

Search for "Mysql-python" through ctrl+f and then purple:

Download 64-bit version

Then run Setup: Pip install MYSQL_PYTHON-1.2.5-CP27-NONE-WIN_AMD64.WHL

Then wait a minute.

Oh yeah, success, I can quickly start the door of our next development work

Finally, you are welcome to watch my mini scrapy crawler frame:

https://github.com/xueleilei120/mini_spider 

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.