-
Notifications
You must be signed in to change notification settings - Fork 192
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
Fix/depthai installer for mac #1053
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
fb95345
Install Homebrew and Git only if not installed already
b932a87
Don't just update the Brew
e4da54a
Don't just update the Brew
a390cbd
PyQt5 is already available for m1, no need for woraround
24ba6f3
improve the error message to find out easier which script failed
1f0f851
Add information messsage for macOS users about PATH configuration + R…
spbui00 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ mkdir "$WORKING_DIR" | |
install_path="" | ||
path_correct="false" | ||
|
||
trap 'RET=$? ; echo -e >&2 "\n\x1b[31mFailed installing dependencies. Could be a bug in the installer or unsupported platform. Open a bug report over at https://github.com/luxonis/depthai - exited with status $RET at line $LINENO \x1b[0m\n" ; exit $RET' ERR | ||
trap 'RET=$? ; echo -e >&2 "\n\x1b[31mFailed installing depthai. Could be a bug in the installer or unsupported platform. Open a bug report over at https://github.com/luxonis/depthai - exited with status $RET at line $LINENO \x1b[0m\n" ; exit $RET' ERR | ||
|
||
while [ "$path_correct" = "false" ] | ||
do | ||
|
@@ -127,9 +127,6 @@ if [[ $(uname -s) == "Darwin" ]]; then | |
echo "Installing global dependencies." | ||
bash -c "$(curl -fL https://docs.luxonis.com/install_dependencies.sh)" | ||
|
||
echo "Upgrading brew." | ||
brew update | ||
|
||
# clone depthai form git | ||
if [ -d "$DEPTHAI_DIR" ]; then | ||
echo "Demo app already downloaded. Checking out main and updating." | ||
|
@@ -142,20 +139,13 @@ if [[ $(uname -s) == "Darwin" ]]; then | |
git checkout main | ||
git pull | ||
|
||
# install python 3.10 and python dependencies | ||
brew update | ||
|
||
if [ "$install_python" == "true" ]; then | ||
echo "installing python 3.10" | ||
brew install [email protected] | ||
python_executable=$(which python3.10) | ||
fi | ||
|
||
# pip does not have pyqt5 for arm | ||
if [[ $(uname -m) == 'arm64' ]]; then | ||
echo "Installing pyqt5 with homebrew." | ||
brew install pyqt@5 | ||
fi | ||
moratom marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
# create python virtual environment | ||
echo "Creating python virtual environment in $VENV_DIR" | ||
|
@@ -166,20 +156,14 @@ if [[ $(uname -s) == "Darwin" ]]; then | |
python -m pip install --upgrade pip | ||
|
||
# install launcher dependencies | ||
# only on mac silicon point PYTHONPATH to pyqt5 installation via homebrew, otherwise install pyqt5 with pip | ||
if [[ $(uname -m) == 'arm64' ]]; then | ||
if [[ ":$PYTHONPATH:" == *":/opt/homebrew/lib/python3.10/site-packages:"* ]]; then | ||
echo "/opt/homebrew/lib/python$nr_1.$nr_2/site-packages already in PYTHONPATH" | ||
else | ||
export "PYTHONPATH=/opt/homebrew/lib/python$nr_1.$nr_2/site-packages:"$PYTHONPATH | ||
echo "/opt/homebrew/lib/pythonv$nr_1.$nr_2/site-packages added to PYTHONPATH" | ||
fi | ||
else | ||
pip install pyqt5 | ||
fi | ||
|
||
pip install pyqt5 | ||
pip install packaging | ||
|
||
# Inform macOS users about PATH changes | ||
echo "DepthAI has been added to your PATH in .bashrc and .zshrc (if present)." | ||
echo "If you prefer, you can manually add the following line to your .bash_profile for it to be recognized in login shells:" | ||
echo "export PATH=\$PATH:$ENTRYPOINT_DIR" | ||
|
||
elif [[ $(uname -s) == "Linux" ]]; then | ||
echo _____________________________ | ||
echo "Calling linux_installer.sh" | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PetrNovota this is not needed anymore or was it never needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was never needed. I think this is actually relatively dangerous to do without the users permission.