AutoGPT Local Setup (Mac & PC)

AutoGPT Local Setup (Mac & PC)

AutoGPT - Tutorial setup (local)


You might encounter some issues with your terminal or say the ‘pip’ command in your terminal. If you have issues or errors put the error command into ChatGPT and tell it what you want to do and it will give you the commands to run. You might need to install things like Python3, HomeBrew, Pip etc depending on your computer and if you have done this stuff before. It’s not hard and only takes about 20-30 min to setup.


First we start in the terminal or command prompt I think it is called on a PC. I have done this in a Mac and using ChatGPT to assist with translating them for PC so they should be decent, however just paste this tutorial into ChatGPT and ask it to help you and it will guide you through the process if needed.

P.s: Don’t include the “” in the actual terminal input. 

Step by step:

  1. Set the working directory of the terminal to the parent folder you want to put the AI stuff. Run:

Mac:  “cd ~/Documents”

PC: “cd Documents”

  1. Make a new folder to store all of the AI code and to setup a virtual python environment to run it in. This keeps it a cleaner setup. Run: 

Both: “mkdir AutoGPT_Tutorial”

  1. Set the working directory to the new folder Run:

Mac: “cd ~/Documents/AutoGPT_Tutorial”

PC: “cd Documents\AutoGPT_Tutorial”

  1. Now you need to make the virtual environment that will run the Python code. This holds all of your packages that are downloaded to run the code, Probs does other things but I’m not fully sure how these work, you don’t need to for this. Run: 

Mac: “python3 -m venv venv_py3_autoGPT” 

PC: “py -3 -m venv venv_py3_autoGPT”

  1. Active the virtual environment, this basically tells your terminal to use this folder for all the python stuff. Run:

Mac: “source venv_py3_autoGPT/bin/activate” 

PC: “myenv\Scripts\activate” (if you run into an issue with this put it into Chat GPT with the error, you might get a permissions error the ‘source’ in the Mac is added to get around permissions, not sure what it is for PC)

Now you should have the folders and terminal setup to run AutoGPT. Now time to get AutoGPT :)

You could do this in the terminal really easily however when I did this my folders had permission issues and it didn’t work, so I would recommend the manual approach however just run this command in the active terminal from the setup before Run: “git clone https://github.com/Significant-Gravitas/Auto-GPT.git


  1. 1 . Open this GitHub repository (don’t think you need to make a login) : https://github.com/Significant-Gravitas/Auto-GPT
  2. Download the Zip folder and Extract it to your folder
  3. Open the folder. And change the file called .env.template to .env - this will change it from a template file to a global environments file type so that you can put your API keys in there. This makes it more secure and more convenient. Note that the actual file extension needs to change. If you get an issue with the Api key not being found this is likely the issue.
  4. On Mac follow this: 
  5. Open the folder, and press “Command + Shift + Full stop”. If stuck go here: https://setapp.com/how-to/show-hidden-files-on-mac
  6. You should now be able to see the file ‘.env.template’ - right click and click get info
  7. Under the menu ‘Name & Extension’ untick ‘Hide extension’ 
  8. Delete the ‘.template’ from the Name & extension text box
  9. Click the cross and then click the ‘Remove’ button that comes up.
  10. Open the .env file in any text editor 
  11. Edit the file and add in your OpenAI API key where it says to. (if you don’t have an API key go here: https://platform.openai.com/account/api-keys - you will need to sign up and make a billing account, it’s not that costly and I recommend going to the billing section (https://platform.openai.com/account/billing/limits) and setting monthly limits start with $5 or $10/month). It should look something like this when you have done it OPENAI_API_KEY="sk-0cmJL…” <- remember to add in the “” around the key. Save and exit.
  12. Back in your terminal: Set working directory to the Auto-GPT folder you downloaded before: Run: 

Mac: “cd ~/Documents/AutoGPT_Tutorial/Auto-GPT”

PC: “cd Documents\AutoGPT_Tutorial\Auto-GPT”

  1. Install the requirements. This downloads python packages required for the code to run. Run: 

Both (I think): “pip install -r requirements.txt”


Great now you can run it!

Put the below commands into the terminal to run it! 

  1. Run either:

Best: GPT4: “python3 -m autogpt”

Cheap: GPT-Turbo:  “python3 -m autogpt —gpt3”


Now you should have it all setup, you can do additional things with the setup like adding in a vector database to store the history. To learn more use the internet :) 


To run it each time you need to do this: 

  1. Open Terminal
  2. Set working directory: Run:

Mac: “cd ~/Documents/AutoGPT_Tutorial”

PC: “cd Documents\AutoGPT_Tutorial”

  1. Set Virtual Env: Run: 

Mac: “source venv_py3_autoGPT/bin/activate” 

PC: “myenv\Scripts\activate

  1. Set working directory: Run: 

Mac: “cd ~/Documents/AutoGPT_Tutorial/Auto-GPT”

PC: “cd Documents\AutoGPT_Tutorial\Auto-GPT”

  1. Run either:

Best: GPT4: “python3 -m autogpt”

Cheap: GPT-Turbo:  “python3 -m autogpt —gpt3”

End of tutorial

TLDR.

Here is the list of commands required, you should be able to just run each line in the terminal and it should work.

For Mac:

Setup:

cd ~/Documents

mkdir AutoGPT_Tutorial

cd ~/Documents/AutoGPT_Tutorial

python3 -m venv venv_py3_autoGPT

source venv_py3_autoGPT/bin/activate

git clone https://github.com/Significant-Gravitas/Auto-GPT.git

[File editing + API Key]

cd ~/Documents/AutoGPT_Tutorial/Auto-GPT

pip install -r requirements.txt

python3 -m autogpt OR python3 -m autogpt --gpt3


Run each time:

cd ~/Documents/AutoGPT_Tutorial

source venv_py3_autoGPT/bin/activate

cd ~/Documents/AutoGPT_Tutorial/Auto-GPT

python3 -m autogpt OR python3 -m autogpt --gpt3


For PC:

Setup:

cd Documents

mkdir AutoGPT_Tutorial

cd Documents\AutoGPT_Tutorial

py -3 -m venv venv_py3_autoGPT

myenv\Scripts\activate

git clone https://github.com/Significant-Gravitas/Auto-GPT.git

[File editing + API Key]

cd Documents\AutoGPT_Tutorial\Auto-GPT

pip install -r requirements.txt

python3 -m autogpt OR python3 -m autogpt --gpt3


Run each time:

cd Documents\AutoGPT_Tutorial

myenv\Scripts\activate

cd Documents\AutoGPT_Tutorial\Auto-GPT

Thanks for the guide. Spent a couple of hours yesterday, can't figure out the mistake, maybe you can help?  "File "<frozen runpy>", line 198, in _run_module_as_main  File "<frozen runpy>", line 88, in _run_code  File "/Users/dmytromakei/Auto-GPT/autogpt/__main__.py", line 2, in <module>   import autogpt.cli  File "/Users/dmytromakei/Auto-GPT/autogpt/cli.py", line 2, in <module>   import click " Say I need to import "click" - I did that, say it's installed, and fixed a bunch of other issues asking GPT4.

Like
Reply

To view or add a comment, sign in

More articles by Daniel Paull

Others also viewed

Explore content categories