Skip to content
site logo mobile

Forum in maintenance, we will back soon 🙂

ChatGPT Earthquake ...
 
Notifications
Clear all

ChatGPT Earthquake on Mac

14 Posts
4 Users
3 Reactions
802 Views
(@mirad)
Posts: 6
Active Member
Topic starter
 

Hi Hasan,

Do you have the script files also for Mac?

Thanks!

 
Posted : 05/26/2023 9:49 pm
SSAdvisor
(@ssadvisor)
Posts: 1087
Noble Member
 

The python scripts should work fine. The run-me.bat file would need some work but see my contribution at https://learnwithhasan.com/forum/postid/66/ and let me know what occurs.

Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack

 
Posted : 05/27/2023 12:48 am
(@kakil)
Posts: 8
Member
 

If you are on a Mac:

1) Create a new file in the ChatGPT Earthquake directory and insert the following script:

 

#!/bin/zsh

echo "Installing necessary Python modules..."
pip install -r requirements.txt
echo "Running Python script..."
python app.py

 

2) Save the file and Name the file anything you like, but just be sure that the file ends in ".sh" ( without the quotes ).  For example:  run-me.sh

3) To make the script executable, open a terminal, navigate to the directory containing the script, and run the following command:  

chmod +x run-me.sh

4) Run the script using the command ./run-me.sh

This will do the exact same thing that the batch file executes on Windows.

This post was modified 1 year ago by kakil
 
Posted : 05/28/2023 9:58 pm
SSAdvisor
(@ssadvisor)
Posts: 1087
Noble Member
 

@Mirad did you get a chance to try out my changes to run-me.bat?

Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack

 
Posted : 05/29/2023 6:19 am
(@mirad)
Posts: 6
Active Member
Topic starter
 

@kakil 

Hi,

Thanks for your reply, but it doesn't work. I get the errors attached.

Captură de ecran din 2023 06 13 la 00.48.31
Captură de ecran din 2023 06 13 la 00.49.05

 Kind regards

Mihai

 
Posted : 06/12/2023 9:53 pm
(@mirad)
Posts: 6
Active Member
Topic starter
 

@ssadvisor 

Hi,

Sorry for answering so late. Unfortunately, it doesn't work. Command executed, it runs, but at certain point it closes the terminal.

Kind regards

Mihai

 
Posted : 06/12/2023 9:56 pm
(@kakil)
Posts: 8
Member
 

@mirad  It appears from the error that the run-me.sh file is not in the directory that contains the requirements.txt file.  Make sure that the run-me.sh is in the same directory.  Here's an example of how that looks in Visual Studio Code:

chatgpt earthquake directory structure

Here's what the file looks like in VS Code:

run me file

In regards to the tiktoken error that is because the install of the modules from the requirements.txt did not occur.  

If you list the contents of the directory that stores the files here's what that should look like in your terminal:

terminal directory view

 

 

 
Posted : 06/12/2023 11:14 pm
(@kakil)
Posts: 8
Member
 

Here is a video of the script executing a running correctly:

https://youtu.be/BdgQpU7pYK4

 
Posted : 06/12/2023 11:27 pm
(@gee-whiz)
Posts: 2
New Member
 

has anyone gotten this to work on a Mac? I get a message regarding:

Building wheel for lxml (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1

 

and more about wheels

This post was modified 1 year ago by gee whiz
 
Posted : 06/13/2023 3:32 am
(@mirad)
Posts: 6
Active Member
Topic starter
 

@kakil 

Hi,

it seems you have aditional files than I have. Unfortunately, I am pure beginner in Python and I can't figure out what it's really wrong.

Captură de ecran din 2023 06 14 la 01.05.36
Captură de ecran din 2023 06 14 la 01.04.09

 

 
Posted : 06/13/2023 10:09 pm
(@kakil)
Posts: 8
Member
 

@mirad , no worries.  There is only one file you need to add to make it work on your Mac.  Just add the shell script file to the directory with the other files for ChatGPT Earthquake.

Ignore the .git files and other invisible files you see in my directory.

1) Dowload the ChatGPT Earthquake files and unzip to a folder in your finder

2) create a new file: run-me.sh

3) add the following code to the file:

 

#!/bin/zsh
 
echo "Installing necessary Python modules..."
pip install -r requirements.txt
echo "Running Python script..."
python app.py
 
4) save the file
 
5) To make the script executable, open a terminal, navigate to the directory containing the script, and run the following command in the terminal:  

chmod +x run-me.sh

6) in the terminal Run the script using the command:

 
./run-me.sh
 
Because we are on a Mac we can’t run batch files.  We need to convert the batch file to a shell script file.  Once we create the shell script file we need to change the file permissions so that we can run the file using chmod.  Once that is done we can run the shell script using the ./run-me.sh
 
 
 
Posted : 06/14/2023 1:10 am
(@mirad)
Posts: 6
Active Member
Topic starter
 

@kakil 

Hi, unfortunately it doesn't work. I have problems by setting up the environment and the command ./run-me.sh is bringing an error. Command chmod +x run-me.sh has no output.

All the best!

Mihai

Captură de ecran din 2023 06 18 la 21.38.39
Captură de ecran din 2023 06 18 la 21.39.58
Captură de ecran din 2023 06 18 la 21.39.00
Captură de ecran din 2023 06 18 la 21.40.09
Captură de ecran din 2023 06 18 la 21.49.08

 

 
Posted : 06/18/2023 7:20 pm
(@mirad)
Posts: 6
Active Member
Topic starter
 

@gee-whiz 

No! On Mac it's not working at all. I tried everything I knew or found online, but no chance. I give it up now.

 
Posted : 06/22/2023 9:52 pm
SSAdvisor
(@ssadvisor)
Posts: 1087
Noble Member
 

@gee-whiz and @Mirad I got those errors on my Linux client. I had to install development libraries and applications on the system to build python-cairo. I forget which ones, but gcc and python-dev come to mind.

Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack

 
Posted : 06/24/2023 3:51 pm
Share: