Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Environmental path to Python not working?

I have Installed Python 3.4 onto a new PC. Python works but I am trying to get pip to work on this. I have made a path for Python which is below.

C:\Python34\python.exe

When i run the below code

C:\Windows\System32>pip install python-docx


'python' is not recognized as an internal or external command,
operable program or batch file.
like image 218
WAMPS Avatar asked Jan 28 '16 15:01

WAMPS


People also ask

Why isn't Python on my path?

To add Python to your Windows PATH, you need to get its installation path. To do that, open up the Windows search bar and type python.exe (don't hit the Enter key). Then right-click on Python.exe that pops up in the resulting menu and select the Open file location option.

What is a pythonpath environment variable?

Understanding the Pythonpath Environment Variable in An environment variable that lets you add additional directories where Python looks for packages and modules. As these variables are not needed for Python to run, they are not set for most installations. Python can find its standard library.

Why is my Python Path not being added to Windows path?

If you’ve installed Python in Windows using the default installation options, then the path to Python will not be added to the Windows Path variable. The Path variable lists the directories that will be searched for executing when you type a command in the command prompt.

How to set pythonpath in Windows 10?

Here is how to set PYTHONPATH on a windows machine: Step 1: Open My Computer or This PC and right-click on it. Then click on properties. Step 2: When the properties window pops up, click on the Advance System Settings. Step 3: Click on the environment variable button that appears in the new popped-up window.

How do I add Python to the path in Linux?

Then click on Environment Variables. This is where we can add Python to the PATH environmental variable. Find the PATH variable and click Edit. You want to add Python to this PATH variable by adding ;C:\Python27 to the end of that string (or whatever the path to your Python installation is).


1 Answers

It seems that you haven't configured your PATH variable correctly. In order to do so:

  • Hold down the Win key and press Pause.
  • Click Advanced System Settings.
  • Click Environment Variables.
  • Append ;C:\Python34 to the PATH variable.
  • Restart Command Prompt.

(You may also just run set PYTHONPATH=%PYTHONPATH%;C:\Python34 in the cmd)

Further information is available in The Official Python Installation Guide for Windows.

like image 190
Idos Avatar answered Oct 22 '22 04:10

Idos