Databytes

Daily bytes of learning

26 Mar 2023

Local Env Refresh | Poetry p3

Local Env Refresh | Poetry p4

SSL Error Resolution

In my previous post, I encounter an SSL error trying to install poetry with Python 3.10. After trying a couple things, the fist Stack Overflow (SO) article I encountered gave a solution that worked well:

ln -s /etc/ssl /usr/local/etc/openssl@1.1 from a response by Guss

Summary (of my understanding): my new pyenv python version was missing a link to my client side SSL certs. The command provided by Guss created a symbolic file link between between the OS certifications to where pyenv’s pythons expects my certs. Disclaimer I am not sure my understanding is correct on why the symbolic link worked.

Poetry Configuration

The poetry install command worked just fine now: sudo curl -sSL https://install.python-poetry.org | python3 -

And a quick export of poetry’s location to the path, and we are good to go!

Project Setup

Poetry is now setup on my machine. I am going to try to create my new project by following the basic usage tutorial.

I’m calling my project mark4, so my project command was: poetry new mark4.

Dependency Installation

My two dependencies are tensorflow and hydra. Using the command:

poetry add tensorflow

I got the error:

```For tensorflow-io-gcs-filesystem, a possible solution would be to set the python property to “>=3.10,<3.12"``

so, I went into the mark4 pyproject.toml and set python = ">=3.10,<3.12". Simple right? :D

The command poetry add tensorflow then worked. I then also added hydra-core to the environment. My project is now primed for the initial dev work. Here is my initial commit.