AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

Run autogpt - ./run.sh: line 2: python: command not found

Open fuser333 opened this issue 1 year ago • 12 comments

Discussed in https://github.com/Significant-Gravitas/Auto-GPT/discussions/2974

Originally posted by ryanbakkerNZ April 22, 2023 Getting the following error when trying to run ./run.sh start on Mac.

./run.sh: line 2: python: command not found ./run.sh: line 8: python: command not found

fuser333 avatar Apr 23 '23 08:04 fuser333

I had to update my run.sh file and change python to python3 and pip to pip3 and then was able to successfully run

dilldill1 avatar Apr 23 '23 09:04 dilldill1

make symlinks python to python3 and so on

UlrichThiess avatar Apr 23 '23 09:04 UlrichThiess

Can someone show me step-by-step how to do this? I am complete nub

RoyalFatness avatar Apr 23 '23 14:04 RoyalFatness

For me, inside the run.bat file (within root), I replaced python -m autogpt %* by py -m autogpt %*., and now it runs.

Cyrillus5 avatar Apr 23 '23 16:04 Cyrillus5

Can someone show me step-by-step how to do this? I am complete nub

On what OS are you trying to run run.sh ?

klppl avatar Apr 23 '23 16:04 klppl

To create symbolic links for python to point to python3, and also for pip to point to pip3, follow these steps:

Open a terminal.

Remove any existing python and pip symbolic links in /usr/local/bin:

sudo rm /usr/local/bin/python
sudo rm /usr/local/bin/pip

Create new symbolic links for python to point to python3 and for pip to point to pip3:

ln -s /usr/local/bin/python3 /usr/local/bin/python
ln -s /usr/local/bin/pip3 /usr/local/bin/pip

Now, when you run the python command, it should invoke Python 3.x, and when you run the pip command, it should invoke pip3

nawartamawi avatar Apr 23 '23 19:04 nawartamawi

Just ask Chat-GPT.

"How could i run Python with the command 'python' instead of 'python3'?

UlrichThiess avatar Apr 23 '23 20:04 UlrichThiess

There's a much simpler solution to this.

sudo apt install python-is-python3

Install and everything works

blizzard25 avatar Apr 23 '23 22:04 blizzard25

In the Auto-GPT Folder. Go down to "run.sh" in there, go to line 2 and line 8 and switch "python" to "python3" and in line 6 switch "pip" to "pip3"

Raven2905 avatar May 01 '23 04:05 Raven2905

In the Auto-GPT Folder. Go down to "run.sh" in there, go to line 2 and line 8 and switch "python" to "python3" and in line 6 switch "pip" to "pip3"

thanks you , I did it

tctdng avatar May 01 '23 17:05 tctdng

Changes to pip3 and python3 confirmed. Works

Yakelixir avatar May 06 '23 20:05 Yakelixir

changed pip to pip3 and python to python3 fixed for me too. (this is what comes of just running scripts, feeling save in a VM :)

AdamDudley avatar May 09 '23 18:05 AdamDudley

This issue has automatically been marked as stale because it has not had any activity in the last 50 days. You can unstale it by commenting or removing the label. Otherwise, this issue will be closed in 10 days.

github-actions[bot] avatar Sep 06 '23 21:09 github-actions[bot]

This issue was closed automatically because it has been stale for 10 days with no activity.

github-actions[bot] avatar Sep 18 '23 01:09 github-actions[bot]

hi how do i resolve this issue? somehow still doesnt seem to work?

File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/venv/init.py", line 31, in should_use_symlinks raise Exception("This build of python cannot create venvs without using symlinks") Exception: This build of python cannot create venvs without using symlinks ❌ There was an issue with the installation.

Jaryllim98 avatar Mar 27 '24 03:03 Jaryllim98