Conda is a package/dependency management system for python.
We will use the miniforge
installer and install it through pyenv
.
If you don't have homebrew already install it over here: https://brew.sh/
Run:
brew install pyenv
Run:
pyenv install miniforge3-4.10.3-10
pyenv global miniforge3-4.10.3-10
Navigate to the projects root directory.
Run:
conda create --name env_embedded python=3.8
conda activate env_embedded
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate': To fix run
conda init zsh
(replacezsh
with whatever shell you are using if notzsh
)
The required version of tensorflow is 2.6.0
Intel Installation
pip install tensorflow==2.6.0
M1 Installation
conda install -c apple tensorflow-deps==2.6.0
pip install tensorflow-macos==2.6.0
pip install tensorflow-metal==0.2.0
conda uninstall numpy && conda install numpy=1.19.2
clang: error: the clang compiler does not support 'faltivec'. To fix run:
brew install openblas && OPENBLAS="$(brew --prefix openblas)" conda install numpy
ERROR: Failed building wheel for h5py. To fix run
conda install h5py
conda install -c pytorch torchvision
conda install -c conda-forge pycocotools
pip install imgaug
Error: tensorflow-macos 2.6.0 requires numpy~=1.19.2, but you have numpy 1.24.1 which is incompatible. Make sure previous version of numpy is uninstalled.
This will take a long time... (>20 mins)
pip install pyqt5 --config-settings --confirm-license= --verbose
AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'. Need to install qt5 via brew, then add to path: https://stackoverflow.com/questions/65447314/attributeerror-module-sipbuild-api-has-no-attribute-prepare-metadata-for-bui/67606704#67606704
pip install pixellib
conda install jupyter
cd scripts
chmod +x ./getModels.sh
./getModels.sh
Custom training with pixel lib - https://towardsdatascience.com/custom-instance-segmentation-training-with-7-lines-of-code-ff340851e99b
Structuring python projects
- https://dev.to/codemouse92/dead-simple-python-project-structure-and-imports-38c6
- https://www.brainsorting.com/posts/structuring-a-python-application/#installable-single-package
tf macm1
- https://developer.apple.com/metal/tensorflow-plugin/
- https://medium.com/@glen.yu/installing-tensorflow-on-apple-m1-pro-using-pyenv-7a7dec40f7c6
- https://www.fredlich.com/works/installing-tensorflow-on-m1-with-pyenv
faltvec error
tf batch normalization erro
pyqt5 stuck
pixellib official docs
python modules