How to add Python Path in Windows Environment Variables

I got to do this when I need to migrate my customer's Nexus 1000v to the VMWare vDS. Go through the migration documents, first step is to install Python and add the python to the Windows Environment Variable.

Python version is 2.7.
My Windows Version = Windows Server 2008 R2 Enterprise

To add python into the Windows environment variable and then start the python from command prompt.

Go to the
  1. Go to Control Panel>System and Security>System.
  2. Select Advanced system settings.
  3. Select Environment Variables as shown in following figure.
  4. Under system variable, Click New
  5. Add first variable as 
    1. Variable Name = PATH
    2. Variable Value = C:\Python27;%PATH%
  6. Add second variable as
    1. Variable Name = PYTHONPATH
    2. Variable Value = %PYTHONPATH%;C:\Python27
Click OK to save newly added two variables, open command prompt window and type python and you should be on the Python prompt. 

No comments:

Post a Comment