The reason we use the “-m” switch is because as mentioned at the beginning of this post, there is a bug in Python for Windows 10 which causes an error to occur when trying to install with pip.Īfter it’s installed, type exit to quit Command Prompt. In the Administrator: Command Prompt type the following command to install virtualenv. We load it in Admin mode because we are installing packages which will likely require elevated rights. Right click the Windows button and select Command Prompt (Admin). Install Virtualenv Using Pip and Create Your First Environment On the System Properties screen, click OK. Once done, click OK.Ĭlick OK on the Environment Variables screen. (note the semi colon which is used to separate the items in this list. Right click the Windows menu and select System.įrom the System menu, select Advanced system settings.įrom the System Properties menu, select the Advanced tab and click on Environment Variables…įrom the System variables section, location the Path variable, select it and click Edit…įrom the Edit System Variable menu, navigate to the end of the Variable value and append: C:\Python27\Scripts
We do this so we can feel like we are using a unix based system where you can just type commands line pip into the console and they work (without having to type the full executable URL). Add Python scripts directory to system pathįirst, we add the python scripts directory to the system path. If you have not done this or are in doubt, please follow this first: Setting up your Windows 10 System for Python Development (PyDev, Eclipse, Python). Let me just re-iterate, this article assumes that you have Python installed with the necessary path variables set. If you want to learn more about the status of this, you can track it via this ticket. This bug has been fixed in the current dev release but still exists in the production version at the time of writing this article. In the current public version of Python, there is a bug in one of the packages which will display the following error message if you try to install any packages using pip: Fatal error in launcher: Job information querying failed
If you need to know how to do this, please see my previous post: Setting up your Windows 10 System for Python Development (PyDev, Eclipse, Python). This article assumes that you have Python, Eclipse and the PyDev plugin installed on your machine. There is also a little Hello World style example at the end! This article will explain how to install virtualenv and create a new Python Project in eclipse which uses a custom virtual environment.