Skip to content

Prompt Engineering Forum

A Private Forum For Premium Users

ChatGPT Earthquake ...
 
Notifications
Clear all

ChatGPT Earthquake on Mac

14 Posts
4 Users
3 Likes
302 Views
(@mirad)
Posts: 6
Active Member
Points: 22
Topic starter
 

Hi Hasan,

Do you have the script files also for Mac?

Thanks!

 
Posted : 26/05/2023 9:49 pm
SSAdvisor
(@ssadvisor)
Posts: 263
Reputable Member
Premium Member
Pythonista Prodigy Badge
Prompt Engineer
Points: 1056
 

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
https://calendly.com/seasonedsolutionsadvisor

 
Posted : 27/05/2023 12:48 am
(@kakil)
Posts: 4
Active Member
Premium Member
Pythonista Prodigy Badge
Prompt Engineer
Points: 470
 

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 4 months ago by kakil
 
Posted : 28/05/2023 9:58 pm
SSAdvisor
(@ssadvisor)
Posts: 263
Reputable Member
Premium Member
Pythonista Prodigy Badge
Prompt Engineer
Points: 1056
 

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

Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
https://calendly.com/seasonedsolutionsadvisor

 
Posted : 29/05/2023 6:19 am
(@mirad)
Posts: 6
Active Member
Points: 22
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 : 12/06/2023 9:53 pm
(@mirad)
Posts: 6
Active Member
Points: 22
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 : 12/06/2023 9:56 pm
(@kakil)
Posts: 4
Active Member
Premium Member
Pythonista Prodigy Badge
Prompt Engineer
Points: 470
 

@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 : 12/06/2023 11:14 pm
(@kakil)
Posts: 4
Active Member
Premium Member
Pythonista Prodigy Badge
Prompt Engineer
Points: 470
 

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

https://youtu.be/BdgQpU7pYK4

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

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 4 months ago by gee whiz
 
Posted : 13/06/2023 3:32 am
(@mirad)
Posts: 6
Active Member
Points: 22
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 : 13/06/2023 10:09 pm
(@kakil)
Posts: 4
Active Member
Premium Member
Pythonista Prodigy Badge
Prompt Engineer
Points: 470
 

@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 : 14/06/2023 1:10 am
(@mirad)
Posts: 6
Active Member
Points: 22
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 : 18/06/2023 7:20 pm
(@mirad)
Posts: 6
Active Member
Points: 22
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 : 22/06/2023 9:52 pm
SSAdvisor
(@ssadvisor)
Posts: 263
Reputable Member
Premium Member
Pythonista Prodigy Badge
Prompt Engineer
Points: 1056
 

@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
https://calendly.com/seasonedsolutionsadvisor

 
Posted : 24/06/2023 3:51 pm

Share:
Take Your Digital Marketing Skills To The Next Level

© 2023 LearnWithHasan | All Rights Reserved.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

🔴 New Series Started: Programming With AI - RJP Technique
This is default text for notification bar