Local Env Refresh | Poetry p2
Poetry Setup p2
Part of Local Python Environment Refresh Series
Yesterday, I finished install Pyenv which I needed to manage various Python versions alongside Poetry. I need to finish setting up Pyenv for my Bash environment. I want to try to get to installing poetry and setting up a new project with my dependencies.
Okay - the bash commands on this page where just copy paste. Pyenv now runs. I was able to copy paste and run, because my configuration for my usecase is identical to the default instillation.
Python Environment
The latest common supported Python version between Hydra and TensorFlow is 3.10. Running the command pyenv install 3.10
From glancing thru blog post by Hugo Hjerten, poetry will create a virtual environment with my dependencies attached to my newly installed Python version. I’m not sure my understanding is correct here. Will investigate further.
Made sure to set my global python with pyenv global 3.10
. Make sure to restart your terminal after this. I didn’t, but I tested the command ‘python’ and ‘python3’ both of which started a legacy install. Once I opened a new terminal session, both python commands gave me the 3.10 version.
Poetry Instillation
Tried to run the poetry install command from docs:
curl -sSL https://install.python-poetry.org | python3 -
I got an SSL error on that command. Sample of error:
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)>
~The error is definitely descriptive. I’m missing my CA_CERTS_BUNDLE. This SO po addresses the problem, but I want a CLI way to solve the problem.
Upon further research, this seems to be a problem with MacOS. Got the details in this SO Post.~
Investigate Further
- How does poetry use the python version from pyenv?