Page 1 of 1

Installing Restim on a Mac

Posted: Sat Mar 16, 2024 5:54 pm
by froog
Mac users assemble!

Hi I thought i would commence a thread to help people install restim on a Mac - If you don't know what restim is, go here: viewtopic.php?t=26244

I hope no-one minds me doing this. My aim is to help more people enjoy diglet's creation. I will delete this thread if it is not wanted.

This guide may not be the “proper” way to do it, I am not a proper developer. But people have been asking, so I thought I would try to assist,. it works for me on an M1 Mac and I tried on an M2 Mac too. If it does not work, apologies. Maybe others can help you. And I apologise for getting tehcnical on the "On Video" forum, but people seem to use this for discussion of this softwares.

It assumes you have managed to already installed python on your Mac. And assumes you happy to type commands into the MacOS Terminal app. For installing Python there are lots of guides out there. To check if you have python, open the Terminal app and type in:

Code: Select all

python3
(Note for beginners: you type this command at the $ prompt. Press Enter key after each command you ebter.)

If you have python, it will start up, if not you will get an error. Install python and try again until you don’t get an error. Assuming it worked, close that terminal window now. You do not do the rest “in the python app”.

(The rest of this will not work until the above step has worked)

Now go to https://github.com/diglet48/restim/releases in your web browser, and download the latest source code zip file. (Unzip the file by double clicking on it in Finder, if it’s not already unzipped by your browser after it downloaded). I’ll assume you’ve downloaded restim1.14, but the instructions should apply for any release.

You may wish to move the folder to somewhere, for now I’ll assume it’s in your home folder.

Open a new Terminal window and issue the following command to go into the restim folder you created.

Code: Select all

cd restim-1.14
Obviously if you are installing something other than version 1.14 change the commamd to the name of the actual folder it is in.
If you get an error like "no such file or directory" then it means you have put restim in a folder other than your home folder. (So.either move it there and try again to continue, or learn a bit about directories and folders in terminal.)

Now issue the following commands to build restim. When issuing these commands you may get full of output, and perhaps some warnings, but it shouldn’t actually make an error.

First prepare for the build:

Code: Select all

virtualenv ./venv
source ./venv/bin/activate
Now to install some libraries you will need:

Code: Select all

./venv/bin/pip install pyinstaller
./venv/bin/pip install PyQt5
./venv/bin/pip install numpy
./venv/bin/pip install soundfile
./venv/bin/pip install matplotlib
./venv/bin/pip install sounddevice
And finally - to build restim:

Code: Select all

./venv/bin/pyinstaller --clean --onefile --paths "." --add-data "resources/phase diagram bg.svg:resources/" --add-data "resources/favicon.png:resources/" --icon resources/favicon.ico --distpath dist-onefile restim.py
(If you are paying attention you may have noticed this is the same build command in diglet’s build_instructions.txt file, but I have replaced the ; with : )

If it worked, restim is now in the subfolder: dist-onefile

If you double click on restim, in that folder, then it will start (might take a little time)

update: Diglet shows an even simpler way of doing it in their post immediately below. I have not verified if it works on a clean mac. It may do, the above should.

Bonne Chance! :geek:

Re: Installing Restim on a Mac

Posted: Sat Mar 16, 2024 7:48 pm
by diglet
These are the steps for building the release package for Restim. This is nice if you want to distribute an executable to others, but not needed if you just want to run it.

There is a faster way to install the libraries:

Code: Select all

./venv/bin/pip install -r requirements.txt
After the libraries are installed, Restim can be started without building the release package with:

Code: Select all

./venv/bin/python restim.py

Maybe there's somebody in the community that is willing to build the release binaries for OS X each release and distribute them? I can't do that myself because I don't own any apple hardware.

Re: Installing Restim on a Mac

Posted: Sat Mar 16, 2024 8:23 pm
by froog
diglet wrote: Sat Mar 16, 2024 7:48 pm These are the steps for building the release package for Restim. This is nice if you want to distribute an executable to others, but not needed if you just want to run it.

There is a faster way to install the libraries:....
Thanks for this. I will amend the post to point people to your comment.
Spoiler: show
I actually do need it as a executable, because I use it as part of a bigger set up, in a programme called "Audio Hijack" which can capture audio from Mac apps and do cool routing things with them , including routing some to my estim box- I feel nervous capturing all audio from the "python" process (possibly irrationally so), so having it all bundled in it's own app makes me feel safer.

Re: Installing Restim on a Mac

Posted: Wed Mar 20, 2024 9:30 pm
by pablo495
diglet wrote: Sat Mar 16, 2024 7:48 pm These are the steps for building the release package for Restim. This is nice if you want to distribute an executable to others, but not needed if you just want to run it.

There is a faster way to install the libraries:

Code: Select all

./venv/bin/pip install -r requirements.txt
After the libraries are installed, Restim can be started without building the release package with:

Code: Select all

./venv/bin/python restim.py

Maybe there's somebody in the community that is willing to build the release binaries for OS X each release and distribute them? I can't do that myself because I don't own any apple hardware.
Bloody hell! I can't get past "syntax error"

Re: Installing Restim on a Mac

Posted: Wed Mar 20, 2024 10:01 pm
by pablo495
I guess what I'm looking is what to type in before I type the command in. My invalidsyntax error varies but it points to "restim" most of the time.

Re: Installing Restim on a Mac

Posted: Thu Mar 21, 2024 5:08 am
by froog
pablo495 wrote: Wed Mar 20, 2024 10:01 pm I guess what I'm looking is what to type in before I type the command in. My invalidsyntax error varies but it points to "restim" most of the time.
Can you share exactly what you typed in, and exactly what the error is? Inmay be able to helps.

Re: Installing Restim on a Mac

Posted: Thu Mar 21, 2024 9:22 am
by pablo495
froog wrote: Thu Mar 21, 2024 5:08 am
pablo495 wrote: Wed Mar 20, 2024 10:01 pm I guess what I'm looking is what to type in before I type the command in. My invalidsyntax error varies but it points to "restim" most of the time.
Can you share exactly what you typed in, and exactly what the error is? Inmay be able to helps.
First, I type in python3 as shown and hit enter. Then I type in the next line "cd restim-1.16". Python then calls a error and points to the r in restim. My restim file sits in the desktop folder on my machine for ease of use. I even tried getting python to look there by typing "/users/myusername/desktop/restim-1.16". I've never used python or tried to load a windows app on my mac, so I am like an infant here. I just need a nudge in the right direction to get my brain wired up for using a unfamiliar program.

Re: Installing Restim on a Mac

Posted: Thu Mar 21, 2024 12:01 pm
by froog
pablo495 wrote: Thu Mar 21, 2024 9:22 am
froog wrote: Thu Mar 21, 2024 5:08 am
pablo495 wrote: Wed Mar 20, 2024 10:01 pm I guess what I'm looking is what to type in before I type the command in. My invalidsyntax error varies but it points to "restim" most of the time.
Can you share exactly what you typed in, and exactly what the error is? Inmay be able to helps.
First, I type in python3 as shown and hit enter. Then I type in the next line "cd restim-1.16". Python then calls a error and points to the r in restim. My restim file sits in the desktop folder on my machine for ease of use. I even tried getting python to look there by typing "/users/myusername/desktop/restim-1.16". I've never used python or tried to load a windows app on my mac, so I am like an infant here. I just need a nudge in the right direction to get my brain wired up for using a unfamiliar program.
Thanks for that detail. So I think my instructions were not clear enough. Assuming you are following my steps in the first post, and have got python installed (which is what typing python3 confirms)...., you do not do the rest of the steps "in" python

So do the next step (cd restim-1.16 ) in a new terminal window (Close the one you were using to check python). You should then be able to do at least the next steps in that new window. Hope that helps. I have reworded the first post.

Re: Installing Restim on a Mac

Posted: Sat Mar 23, 2024 11:25 am
by pablo495
Thanks for the added detail. I'm still not successful. I do exactly as you say and I get "command not found" and "no such file or directory". I even tried opening a terminal in the restim folder by right clicking on the folder. That didn't get the needed results either. I feel that I'm close. Feel free to DM me if needed.

Re: Installing Restim on a Mac

Posted: Sun Mar 24, 2024 7:33 am
by froog
Can you give me the full error message. I'm guessing it says (a little) more than the words "command not found" what else does it say.

Re: Installing Restim on a Mac

Posted: Sun Mar 24, 2024 11:42 am
by pablo495
froog wrote: Sun Mar 24, 2024 7:33 am Can you give me the full error message. I'm guessing it says (a little) more than the words "command not found" what else does it say.
"cd: no such file or directory: restim-1.16"

Re: Installing Restim on a Mac

Posted: Sun Mar 24, 2024 3:35 pm
by froog
Ok so the problem, is from seeing your earlier comment, I think that you have not put it where my instructions expect. Because you have put it in your desktop, try this. Open the new terminal and type

Code: Select all

cd Desktop/restim-1.16

Re: Installing Restim on a Mac

Posted: Sun Mar 24, 2024 5:36 pm
by pablo495
froog wrote: Sun Mar 24, 2024 3:35 pm Ok so the problem, is from seeing your earlier comment, I think that you have not put it where my instructions expect. Because you have put it in your desktop, try this. Open the new terminal and type

Code: Select all

cd Desktop/restim-1.16
Got it, thanks! And now the follow on commands don't work. I'll wait until it's released as an app or continue with my weak windows machine.

Re: Installing Restim on a Mac

Posted: Sun Mar 24, 2024 7:00 pm
by froog
Ok, it was worth a try. For my best idea, it's because although you may have installed python, it's not set up correctly.yet.

Update: You could try pip install virtualenv
If you get command not found on that, then you need to fix your python setup.

Re: Installing Restim on a Mac

Posted: Fri Apr 12, 2024 1:11 pm
by Look-Appropriate3
diglet wrote: Sat Mar 16, 2024 7:48 pm These are the steps for building the release package for Restim. This is nice if you want to distribute an executable to others, but not needed if you just want to run it.

There is a faster way to install the libraries:

Code: Select all

./venv/bin/pip install -r requirements.txt
After the libraries are installed, Restim can be started without building the release package with:

Code: Select all

./venv/bin/python restim.py

Maybe there's somebody in the community that is willing to build the release binaries for OS X each release and distribute them? I can't do that myself because I don't own any apple hardware.
Thanks! Worked for me. Perhaps note that brew works well for installing python first, then create a local environment just for restim? Such as:

brew install python3
# choose a directory to install restim into and change to that directory
# now copy/unzip latest restim to current directory, then:
mkdir env
pip3 -m venv ./env
./env/bin/python3 -m pip install -r requirements.txt
./env/bin/python3 restim.py