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.
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.
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.
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.
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.
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).
It seems that you haven't configured your PATH
variable correctly. In order to do so:
;C:\Python34
to the PATH
variable.(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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With