How can I set up the python environment variable on Windows 7?

Brian Hicks

I would sure like to be able to type "python" on my command line instead of C:\Python27\python.exe. So to that end I'm trying to get the environment variable set up for myself.

Problem is, I can't seem to get the Python system environment variable to set up on my Windows 7 install. So far I have (as variable PYTHONPATH):

C:\Python27;C:\Python27\DLLs;C:\Python27\Lib;C:\Python27\Lib\lib-tk;C:\Python27\Scripts;

Not sure why that won't work. I've tried with a trailing semicolon and without, with backslashes at the end of the folders, and everything. What am I doing wrong?

Sasha Chedygov

You need to set the Python directory as your PATH, not PYTHONPATH. The latter is a separate variable that Python uses. Also, you only need the main directory (C:\Python27).

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How could I set up this variable properly? - Python

How can I check if an environment variable is set in Node.js?

How do I set up Setuptools for Python 2.6 on Windows?

How can I set an environment variable as gulp task?

How can I set up an editor to work with Git on Windows?

How can I set up gVim as my editor on Git for Windows?

How do i set up a bearer token in postman from an environment variable?

How to set up the environment of a Python child process in Windows

How can I set the helm tiller namespace via an environment variable?

How can I set a runtime environment variable based on the value of another

How can I set runtime variable for docker compose environment variable

How can I set the PowerShell default window size in Windows 7?

How can I set up an extended desktop on multiple monitors in Windows 7?

How can I set Windows 7 up to use three monitors?

How to set up Rails dev environment on MacBook Pro running Windows 7?

How can I set up an environment variable to work with TCC?

How can I consistently set an environment variable for a single program?

How do I set an environment variable in the shell to be result of python script?

Play framework 2.3.8: I cannot set the environment variable neither on Windows 7 nor on Ubuntu 14.04

How to set up environment variable properly?

How can I set an environment variable which contains newline characters?

How can I set up a github Machine User on Coldfusion (on Windows)?

How can I set .bash_profile environment variable in Dockerfile?

How do I set up Tkinter in python to display and update a variable?

How to set up a Selenium Python environment for Firefox

How do I set an environment variable in Makefile for Windows?

How can I set the environment variable in request header for curl?

How to set a variable environment Laravel 7

How can I set environment variable for another user account in Windows?