Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation on macOS #393

Closed
axcore opened this issue Apr 1, 2022 · 13 comments
Closed

Installation on macOS #393

axcore opened this issue Apr 1, 2022 · 13 comments
Labels
help wanted Extra attention is needed

Comments

@axcore
Copy link
Owner

axcore commented Apr 1, 2022

This replaces #246, #287, #348, #354 and others.

The README provides a method for installing Tartube on macOS, but it might not work for everyone.

If you have installed Tartube on macOS, please post on this thread.

If you can't install Tartube on macOS, please post on this thread.

@DeeliN221
Copy link

Installation steps for Apple Silicon Mac

Basically, the steps in README.md file are useful, only some details need modification. I actually ran:

brew install cairo pkg-config python
pip install pycairo
brew install gobject-introspection gtk+3
pip install requests yt-dlp
brew install adwaita-icon-theme ffmpeg

After that, go to the unzipped source code folder and run python tartube/tartube.

If you ran into gi module not found error, it is probably PYTHONPATH issue, you need to specify the python package directory for homebrew!

which brew # get its location
# if it is /opt/homebrew/bin/brew
cd /opt/homebrew
find . -name "gi" # find out gi package location
# Add that location to PYTHONPATH variable, for example,
export PYTHONPATH=/opt/homebrew/lib/python3.9/site-packages:$PYTHONPATH
# add it to ~/.zshrc so that everytime launch a zsh shell, it can be added automatically

Cheers 🍻

@system1system2
Copy link

I followed all your instructions @m3lab-zzl, but I still got the gi module not found error.
I followed your recommendation to find . -name "gi" and no result comes out.

@DeeliN221
Copy link

DeeliN221 commented Sep 16, 2022

Did you modify the above instructions according to your own case? It would be better if you can post the command and output in your shell so we can check what happened.

"gi" module refers to PyGObject currently, try this answer, it may help you.

Cheers.

@system1system2
Copy link

It works. Thank you!

The installation provided by @m3lab-zzl + the following addition (in case you have the gi module not found error error) fixed the tartube installation on my macOS 12.5.1 with M1 Pro:

pip3 install PyGObject

@AvrahamTsaban
Copy link

summary of installation steps (worked for me)

brew install cairo pkg-config python
pip3 install pycairo
brew install gobject-introspection gtk+3
pip3 install requests yt-dlp
brew install adwaita-icon-theme ffmpeg
pip3 install PyGObject
python3 {PATH}/tartube/tartube

replace {PATH} according to unzipped source code folder, of course

the remaining question: How should I make the program work as an app, without the need of opening terminal (and keeping it open)?

@AvrahamTsaban
Copy link

Once the last question is answered, we should prompt axcore to update readme.
p.s. May I shorten these commands anyway? IE

brew install cairo pkg-config python gobject-introspection gtk+3 adwaita-icon-theme ffmpeg
pip3 install pycairo PyGObject
pip3 install requests yt-dlp

@axcore
Copy link
Owner Author

axcore commented Oct 7, 2022

I am standing by the update the README as soon as you are all happy with the new installation method.

By the way, on the subject of making Tartube work as an app: presumably it should be installed (either with pip3 install tartube in any directory, or python3 setup.py install inside Tartube's source code directory, the one containing setup.py). If the desktop file (../pack/tartube.desktop) has not been copied to the correct directory (maybe /usr/share/applications ?), then do that manually. The desktop file needs to be edited to add a line, telling MacOS that it's a GUI application.

I googled the step-by-step method for doing that last night, and regrettably this morning I can't find it. Anyway, that is what I would try, if I had a Mac.

@AvrahamTsaban
Copy link

Last output lines for python3 setup.py install:

installing package data to build/bdist.macosx-12-x86_64/egg
running install_data
creating /tartube
error: could not create '/tartube': Read-only file system

What does it mean?

I found no /usr/share/applications on my macos. I do not know how to find equivalent path for mac; another's help is needed.

What line should I add to tartube.desktop?

@axcore
Copy link
Owner Author

axcore commented Oct 7, 2022

  1. Probably you need to give yourself permission to write files in system folders, on Linux the command would be sudo python3 setup.py install

Edit: sudo not su

2/3. I don't know the answers

@AvrahamTsaban
Copy link

You mean sudo (Mac has no su)...
same problem

@axcore
Copy link
Owner Author

axcore commented Oct 15, 2022

I have update the README with additional installation instructions. Do let me know if I've bungled it.

@iitjee
Copy link

iitjee commented Mar 17, 2023

Try brew install pygobject3 gtk+3

Repository owner deleted a comment from Ninja-man07 Aug 10, 2023
@axcore
Copy link
Owner Author

axcore commented Jan 3, 2024

Closed after I successfully tested installation on an actual Mac.

@axcore axcore closed this as completed Jan 3, 2024
@axcore axcore unpinned this issue Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants