I have downloaded a python package called CAMeL tools for Arabic NLP and now I have to install its data packages. It says to run the command
camel_data full
but I'm not sure how to do it. Should I just use
py camel_data full
? When I do this, it gives me
C:\Users\delar\AppData\Local\Programs\Python\Python39\python.exe: can't open file 'C:\Users\delar\AppData\Local\Programs\Python\Python39\Lib\site-packages\camel_data': [Errno 2] No such file or directory
and when I do not use py and just write camel_data full in the command prompt, it says
'camel_data' is not recognized as an internal or external command,
operable program or batch file.
try camel_data light or camel_data full without invoking python or py
I have never used this in my life and I simply did:
pip install camel-tools
Then once it was done installing I did:
camel_data full
And that worked.
You can also check the documentation on how to install the data from here: https://camel-tools.readthedocs.io/en/latest/getting_started.html
Related
I have been working on a small rpg game by using python. I want a picture to pop up during the last boss and I have been told that is possible by using pillow. While trying to install it via this code:
pip install pillow
I get an error that states:
'pip' is not recognized as an internal or external command, operable program or batch file.
What am I supposed to do?
The issue is that the pip script by Python is not found by Windows. The reasons may be:
Improper installation of Python (leading to the file not being on your device)
PATH variable not set properly (leading to the inability of Windows to recognize pip, even if it is present on your device)
Verify if the script is present in your Python installation folder. The default path for pip and other scripts is C:\Users\<username>\AppData\Local\Programs\Python\<version>\Scripts
If there is a pip.exe file in that, just add the full path of the Scripts folder to the Windows PATH variable. Check out this link if you need help with setting the PATH variable
If the file is absent, I recommend a clean re-install of Python on your PC (just to ensure all files are present)
I am trying to install TinyDB as I need to use it for a python program. I have tried following tutorials that suggest installing it via the command prompt. However, whenever I type 'python', it says ''python' is not recognized as an internal or external command,
operable program or batch file.' I have tried adding 'C:\python37-32\' to the end of the PATH variable but it has made no difference. Does anyone have any suggestions?
Check that python.exe is actually in C:\python37-32\
Check if PATH is set correctly in your cmd, type echo %PATH%, if not, try rebooting your system
Once the directory where python.exe is correctly added to PATH, you should be able to run
python -m pip install tinydb
This question already has answers here:
How to add to the PYTHONPATH in Windows, so it finds my modules/packages?
(23 answers)
Closed 5 years ago.
I recently installed Python 3.6 for my Windows 10 (64bit) and I want to use pip, but before to install that, I need to execute the following command using the downloaded get-pip.py program:
python get-pip.py
Somehow this doesn't work and I get the following message from Command Line:
'python' is not recognized as an internal or external command,
operable program or batch file.
(I get the same message when I want to execute some pip commands)
I tried a lot of "solutions" for installing pip, like downloading files from https://bitbucket.org/pygame/pygame/downloads/ but nothing happened, I got the messages...
Could you explain to me why the Command Line doesn't know these commands and how can I install them?
No need for admin access:
The reason the error is arising is because python is not in your PATH (meaning it can be called from any directory in the prompt). You can check that its not in the PATH by typing the following:
echo %path%
which will return lost of different directory paths, but not the one to where you have python installed.
To add python to this (and get rid of your error), follow these steps:
Open up control panel.
Go to System. (skip to this step with: Win+Break )
Go to the Advanced tab at the top.
Click on Environment Variables at the bottom.
In the section User variables for ___, add a new one with New.
In this pop-up add the name : path and value : C:\Python34 (or wherever it is installed).
Hope this helps as this is what I did to get python to work from any directory in the command prompt!
Open your CMD as administrator and type PATH (prints the output of your system PATH Variable). There have to be a PATH directing to your Python Installation directory. Only with that system Path your cmd knows where python.exe is and search there for python.
Normally the Python Installation Setup asks if you want to set a Python Environment PATH Variable. Maybe run the setup again and watch out for that option. And I think there was a checkbox to automatic install pip for python.
If you want to set the Path Environment Variable use this:
https://superuser.com/questions/949560/how-do-i-set-system-environment-variables-in-windows-10
If you want to manually install pip with GET-PIP you have to download get-pip.py first and then run it with python.
Download get-pip from here.
https://pip.pypa.io/en/stable/installing/#installing-with-get-pip-py
Could you explain to me why the Command Line doesn't know these
commands and how can I install them?
This happens when Python executables are not added to PATH.
#xyres provided a nice link on how to do this.
I want to use pip, but before to install that, I need to execute the following command
using the downloaded get-pip.py program:
pip should be bundled with the official Python installer, so there should be no need to get it from other sources
I'm quite a newbie to python, and I was trying to install mechanize for python 3.2.5
I looked up where to find it and found this page: https://github.com/adevore/mechanize/tree/python3 which I assume would work with python 3.2.5
However, it says in the install.txt to run "python setup.py install" but does not tell me where to run that code. I tried cmd but it told me: "python is not recognized as an internal or external command, operable program or batch file"
So, instead, I tried the other option it gave me, which was to drag the contents of the mechanize zip file to the site packages folder. That didn't work either.
If anyone could help me install this module, that would be greatly appreciated. Also, I'm using Windows10 64 bit with Python 3.2.5
If you are getting the error
"python is not recognized as an internal or external command, operable program or batch file"
And you have installed python, then the issue is likely to be that the directory where you have installed python is not in your PATH.
(more often than not, python is installed in a folder pythonXX in your C:// Drive)
Get python onto your path
In cmd prompt type in %PATH%. And confirm that the directory is not there.
To place directories into the path run this commands in command prompt, replacing pythonXX with the directory where you have python installed.
set PATH=%PATH%;C:\pythonXX
To make this change more permanent, i suggest you read this article by How-To-Geek.
After you've placed the python directory into your path, test that python does indeed now run from cmd prompt by typing python into cmd prompt and you should see something like this
Python 3.2.25 (default, Oct 19 2015, 18:04:42)
>>>
go nuts :D
Time to install mechanize tree
now get back out of the python interpreter (type in exit or ctrl-d) and make your way towards the directory where mechanize tree is based (use the cd command to move directories and the dir command to list the contents of directories)
Once in there run the command
python setup.py install
and it should work like a charm :)
I have the familiar problem of not being able to install a Python package, pyautogui; "syntax invalid", with install highlighted:
pip install pyautogui
The explanations I've read are all the same, that this code is to be entered into one of the IDLE windows and not the other. Well I've tried both and the result is the same, syntax invalid.
This is Python 3.4.3 on Windows 7.
As #TigerhawkT3 said in the comments, you are supposed to install from CMD, not the Python Shell. pip is an executable that downloads packages.
As the wikipedia page on pip states:
One major advantage of pip is the ease of its command-line interface, which makes installing Python software packages as easy as issuing one command
So pip needs to be run from the command line.
So how do you use pip?
Since you are on Windows 7 the sure-fire way to run it is to open the start menu, type cmd, and click the first result. Then you will be running command prompt, or CMD for short. I suggest that you run pip -h to display the help for more on how to use pip.
If you have
'pip' is not recognized as an internal or external command,
operable program or batch file.
You need to add the path to your scripts folder (the solution is this SO question).
To take an excerpt, you need to execute
setx PATH "%PATH%;C:\Python34\Scripts".
Note that you need to close and re-open CMD for the change to take effect.
Good luck!
EDIT:
For future reference, if you want to set the environment variable, and Setx isn't working, you should search for Edit the system environment variables. Then go to Environment Variables->(in the second list) Path. Then double click that, and append C:\Python34\Scripts;.