Bash: Python3: command not found (Windows, discord.py)
I've been trying to configure the discord API discord.py and for the purpose of running the Red-MusicBot on my server. I've installed Python 3.5, and added the PATH variables (I clicked the "add Python to PATH" option in install). Here's what my path variables currently look like:
C:\Users\Corey Rigney\AppData\Local\Programs\Python\Python35\Scripts\ C:\Users\Corey Rigney\AppData\Local\Programs\Python\Python35\
Those are the only ones related to Python. Now, as part of discord.py's install process, it wants me to run this command in Git Bash:
$ git clone https://github.com/Rapptz/discord.py $ cd discord.py $ python3 -m pip install -U .[voice]
The first two lines work perfectly, but the third line returns:
bash: python3: command not found
I also cloned pip from GitHub as an attempted fix, although the python install site says it comes packaged with 3.5.
I'm running windows 10, 64-bit.
The overall goal of this is to install a discord music bot, if it would help I can post the errors I get when trying to run that.
On Windows the normal name for the python executable is
python.exe (console program) or
pythonw.exe (for GUI programs).
The python executable is sometimes called
python3 on some platforms, where the default (
python) is the old python 2. On many UNIX-based (inc. Linux and OS X) systems, python 2 is used by system utilities, changing it could have bad consequences on those platforms, hence the name "python3".
On Windows you should be fine - there are other issues on Windows but you won't get those unless you try to use more than one python version.
In the python installed("c:\\Installationpath\Python3.6.0") path you will find "python.exe", just copy-paste in the same place and rename it as bash: python3: command not found I also cloned pip from GitHub as an attempted fix, although the python install site says it comes packaged with 3.5. I'm running Windows 10, 64-bit.
In the python installed(
"c:\\Installationpath\Python3.6.0") path you will find
"python.exe", just copy paste in the same place and rename it as
"python3.exe", now in the command prompt you can check
python3 command should display your python installation. Don't forget to open a new terminal.
Linux/macOS python3 -m pip install -U discord.py # Windows py -3 -m pip install -U discord.py. Otherwise to get voice support you should run the following command: # Linux/macOS python3 You can find more examples in the examples directory. If you're not sure which to choose, learn more about installing packages. bash: python3: command not found También he clonado pip desde GitHub como un intento de arreglar, aunque la instalación de python sitio dice que viene con 3.5. Estoy corriendo windows 10, 64-bit.
Instead of copying the executable, add a script that acts as
A Python 3 script with
#!python3 shebang line will fail to run, because
python3.exe is not exists on Windows - it can be achieved by
To solve the problem, add this script as
python3 in to your
PATH: it will avoke the proper Python command depending on the operating system (works on Windows and Linux as well).
#!/usr/bin/env bash # Fix problem with `python3` shebang on Windows MSYS Bash if [[ "$OSTYPE" =~ ^msys ]]; then py -3 $* else python3 fi
Python3.exe is not defined in windows Specify the path for required version of python when you Bash: Python3: command not found (Windows, discord.py). $ sudo yum install python. Fedora Linux install Python Type the following dnf command to add the Python v2.x: $ sudo dnf install python OR to add the Python v3.x: $ sudo dnf install python3. Arch Linux install Python Type the following pacman command to add the Python v2.x: $ sudo pacman -S python2 OR add the Python v3.x: $ sudo pacman -S
None of the solutions above worked for me, however, I was able to find success with Python 3.7 when instead of writing
python3 -m pip install discord.py, I wrote
C:\InstallPath\python.exe -m pip install discord.py
This probably worked because while the command
python3 was not available in cmd, the path to the python core file worked and took the arguments as the
python3 command would.
NOTE: The normal
python command was not working for me, as I already have 2 installed. Discord for some reason requires 3.5 and above?
I have installed the module for discord properly, using python3.5 but when I then import discord , I get no errors (or text in my cmd window), but I run your pip commands in the PyCharm terminal, located on the bottom left. Thirdly, ensure you are installing discord.py to the correct place. On Linux/Mac: Basically, I type 'python' into Git Bash command line and I get back a blank line as if the command line is thinking I've done plenty of research but I can't seem to run python on Git Bash by typing in python into the command line.
In windows using git bash, python3 didn't worked for me:
$ python --version Python 2.7.15
but if I use py
$ py --version Python 3.8.1
doesn't know why, but It worked
There is no "python3" command. In my book, I solve this by telling people to use a symlink, but that only works if you use git-bash (cf #314) I am not sure how this has been resolved - I am still having this issue. I am on Python v3.6.4 following a Python tutorial and trying to call python3 from the windows (cygwin) command line but I get the message command not found. I dont see a python3.exe in the installation directory either only a python3.dll. If the suggestion made by @hjwp
This is the documentation for discord.py, a library for Python to aid in creating Support for earlier versions of Python is not provided. Python python3 -m pip install -U discord.py. If you are using Windows, then the following should be used instead: On Linux environments, installing voice requires getting the following "Bash.exe": python.exe: command not found. I'm a windows user and I have added the path to my environment variables like so C:\Python27\python.exe;C:\Program Files\Git\bin\bash.exe. I have been looking around but I can't find anyone that has had this problem or they don't give a straightforward answer please help.
My command as follows in the git bash executable python filename.py then it says Bash: Python3: command not found (Windows, discord.py intellipaat.com. # Linux/macOS python3 -m pip install -U discord.py # Windows py -3 -m pip install -U discord.py Otherwise to get voice support you should run the following command: # Linux/macOS python3 -m pip install -U discord.py [voice] # Windows py -3 -m pip install -U discord.py [voice] To install the development version, do the following:
I have python 3.1 installed, and I have added it to the system path too. Now I can open pip - Bash: Python3: command not found (Windows, discord . I also tried installing Python 2.7 for Mac in the hopes that the friendly install process would do any housekeeping like editing PATH and whatever else needs to be happy for everything to work according to the tutorials, but this didn't work.
bashare 2 absolutely different programs. also, have a look at this question
- Are you sure it is called
python3and not just
- @Aserre I looked at it and ran the 'env|grep PATH' command. It returned the two python paths mentioned above in the regular PATH section.
- The python executable is sometimes called
python3on some platforms, where the default (
python) is the old python 2. OS X, for example.
- No! You installed 3.5 which is the current stable version. You are on Windows, so I would not expect there to be a python already there. On many UNIX-based (inc. Linux and OS X) systems, python 2 is used by system utilities, changing it could have bad consequences on those platforms, hence the name "python3". On Windows you should be fine - there are other issues on Windows but you won't get those unless you try to use more than one python version.
- That helped me just copy paste in the same place and rename it as "python3.exe", now in the command prompt you can check python3
- Worked for me in 2019