This paper mainly records the problems and solutions encountered in setting up the environment. about Setuptools, Pip, virtualenv, Environment: win8.1+python2.7.6
1.setuptools:easily download, build, install, upgrade, and uninstall Python packages
2.PIP:A tool for installing and managing Python packages.
3.VIRTUALENV:A Virtual Environment for Python
Details:
Http://www.360doc.com/content/14/0317/23/8504707_361440980.shtml
The blogger has already built a virtualenv for Django 1.6, but this learning needs to use 1.5.4, so it needs to be re-built and failed directly through virtualenv creation.
0.setuptools pip failed with error code 1:
Original: http://bbs.csdn.net/topics/390685064
My solution is to
1. Upgrade Setuptools to 1.4 first.
From Https://pypi.python.org/packages/source/s/setuptools/setuptools-1.4.tar.gz next week setuptools1.4
Then go to the Site-packages setuptools1.4 directory and execute the command:
Python setup.py Build
Python setup.py Install
2. Install virtualenv via PIP
Easy_install pip
Pip Install virtualenv==1.11
3. Installing the Virtual Python environment
Virtualenv Test
Dependency issues, starting installation from Setuptools (correct version)
1. Error installing Setuptools:
Unicodedecodeerror: ' ASCII ' codec can ' t decode byte 0xb0 in position 1:ordinal
Not in range (128)
RELATED links:
1.http://www.oschina.net/question/1409342_134600
2.http://bugs.python.org/review/9291/diff/1663/lib/mimetypes.py
1. Give a solution to the idea, modify the python\lib\mimetypes.py helpless I did not understand, fortunately 2. Found download patch got a diff file
Linux has patches and diff commands to patch and generate patches, unfortunately I'm using windows, I'm lucky enough to have git, git shells with patches
In the Git shell
CD */lib/(* is python27 path)
Patch-p1 < Patch.diff
Outer chain: 1.patch usage
2.git Patch Method
2. Install PIP, virtualenv, etc.:
Easy_install pip
Pip Install virtualenv==1.11
Virtualenv env
Even if the building is done here, I always find it troublesome to go into the virtual environment every time I want to CD to the Activate directory.
3. Set the VIRTUALENV virtual environment shortcut:
This is a bit of originality. ~cmd/? Find/k can be followed by command, with & to complete a line of multiple commands
So, new shortcut-----c:\windows\system32\cmd.exe/k "CD C:\Users\Azwraith\Documents\Github & Env\scripts\ Activate
This will be able to get through the desktop shortcut a button into the ~ I am not very familiar with Windows, I feel this method is quite convenient
Virtualenv build Python development environment on Windows