guy
guy

Reputation: 1131

Python Poetry Failing on Ubuntu

I am trying to get Poetry (python dependency manager) working on Ubuntu 18.04 but it keeps throwing an odd error whenever a package is trying to be added to a project. I tried uninstalling and reinstalling poetry but it did nothing. The ubuntu machine was a clean install with barely anything on it.

The error is here: https://gist.github.com/tylermanning/6881ba664236e25434f8d0befd4a8bfc

System information:

How i installed poetry:

  1. curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
  2. source the thing so poetry can be used immediately with source $HOME/.poetry/env
  3. create a new project with poetry like poetry new tes-proj
  4. launch poetry shell from inside test-proj directory
  5. Try poetry show or poetry add [some package] and the error will be thrown

Upvotes: 3

Views: 1976

Answers (1)

guy
guy

Reputation: 1131

The issue with this was the ubuntu machine was not correctly encoding utf-8 in locale. Here is a more in depth issue explaining it: https://stackoverflow.com/a/57298412

The fix was to simply add export PYTHONUTF8=1 to my ~/.bash_profile

Upvotes: 2

Related Questions