macOS Monterey
Version 12.3.1
Install home-brew:
Link : https://brew.sh
meghanaseshasai@Meghanas-MacBook-Air code % /bin/bash -c "$(curl
-fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/
install.sh)"
curl: (28) Failed to connect to raw.githubusercontent.com port 443
after 75246 ms: Operation timed out
Alternate home-brew installation:
git clone https://github.com/Homebrew/brew homebrew
eval "$(homebrew/bin/brew shellenv)"
brew update --force --quiet
chmod -R go-w "$(brew --prefix)/share/zsh"
Installing pyenv
Link : https://github.com/pyenv/pyenv
https://github.com/pyenv/pyenv-virtualenv
brew install pyenv
brew install pyenv-virtualenv
Installing Python
pyenv install 3.10.6
Installed Python-3.10.6 to /Users/meghanaseshasai/.pyenv/versions/
3.10.6
Installing Poetry
Link : https://python-poetry.org/
curl -sSL https://install.python-poetry.org | /Users/
meghanaseshasai/.pyenv/versions/3.10.6/bin/python3 -
Certificate error:
Error:
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED]
certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)'
error.
Link: https://stackoverflow.com/questions/68275857/urllib-error-urlerror-
urlopen-error-ssl-certificate-verify-failed-certifica
Setting the PATH: (For both pyenv and poetry)
meghanaseshasai@Meghanas-MacBook-Air /etc % sudo vi paths
Add `export PATH="/Users/meghanaseshasai/.local/bin:$PATH"` to your
shell configuration file.
OR
Link: https://techpp.com/2021/09/08/set-path-variable-in-macos-
guide/#:~:text=In%20case%20you%20want%20to,or%20zsh%20(z%20shell)
nano ~/.zshrc
Add: export PATH=$PATH:/path/to/directory
source ~/.zshrc
Alternatively, you can call Poetry explicitly with `/Users/
meghanaseshasai/.local/bin/poetry`.
meghanaseshasai@Meghanas-MacBook-Air code % /Users/
meghanaseshasai/.local/bin/poetry --version
Poetry (version 1.5.1)
Creating pyenv environment
pyenv virtualenv 3.10.6 DataScience-3.10.6
Activating pyenv environment
pyenv activate DataScience-3.10.6
echo $PATH
/Users/meghanaseshasai/.pyenv/shims:/Users/meghanaseshasai/ps1/code/
homebrew/Cellar/pyenv-virtualenv/1.2.1/shims:/Users/meghanaseshasai/
ps1/code/homebrew/bin:/Users/meghanaseshasai/ps1/code/homebrew/
sbin:/Users/meghanaseshasai/.local/bin:/usr/local/bin:/usr/bin:/
bin:/usr/sbin:/sbin
Cloning from forked repository
(DataScience-3.10.6) meghanaseshasai@Meghanas-MacBook-Air code % git
clone git@github.com:meghanaseshasai/dt-expert-bot.git
(DataScience-3.10.6) meghanaseshasai@Meghanas-MacBook-Air code % cd
dt-expert-bot
(Use: ‘nano pyproject.toml’ to remove the line containing psycopg2
in the file.)
(DataScience-3.10.6) meghanaseshasai@Meghanas-MacBook-Air dt-expert-
bot % poetry install
python3
import django
print(django.get_version())
4.2.1
git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv
root)/plugins/pyenv-virtualenv
cd .pyenv
cd plugins
cd pyenv-virtualenv
git pull