Poetry: Poetry throws module not found error (_bz2)

Created on 3 Apr 2019  路  3Comments  路  Source: python-poetry/poetry

  • [x] I have searched the issues of this repo and believe that this is not a duplicate.
  • [x] I have searched the documentation and believe that my question is not covered.

Question

I followed the recommended installation method and am attempting to create a new project

$ curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
Retrieving Poetry metadata

# Welcome to Poetry!

This will download and install the latest version of Poetry,
a dependency and package manager for Python.

It will add the `poetry` command to Poetry's bin directory, located at:

$HOME/.poetry/bin

This path will then be added to your `PATH` environment variable by
modifying the profile files located at:

$HOME/.profile
$HOME/.bash_profile

You can uninstall at any time with `poetry self:uninstall`,
or by executing this script with the --uninstall option,
and these changes will be reverted.

Installing version: 0.12.11
  - Downloading poetry-0.12.11-linux.tar.gz (8.13MB)

Poetry (0.12.11) is installed now. Great!

To get started you need Poetry's bin directory ($HOME/.poetry/bin) in your `PATH`
environment variable. Next time you log in this will be done
automatically.

To configure your current shell run `source $HOME/.poetry/env`

I ran the source command listed

$ source $HOME/.poetry/env

Finally, checked the version to ensure it was installed

$ poetry --version
Poetry 0.12.11
$ pyenv local 3.6.8
$ python --version
Python 3.6.8

I wanted to check that I was utilizing the correct version of python by using poetry debug:info

$ poetry debug:info

[ModuleNotFoundError]  
No module named '_bz2'              

debug:info

How do I resolve this _bz2 missing module?

Most helpful comment

You probably need to install libbz2-dev: https://github.com/pyenv/pyenv/wiki/Common-build-problems

All 3 comments

How did you install Python? The bz2 module can be left out if it's built from source.

I used pyenv to install 3.6.8.

pyenv install 3.6.8

You probably need to install libbz2-dev: https://github.com/pyenv/pyenv/wiki/Common-build-problems

Was this page helpful?
0 / 5 - 0 ratings

Related issues

thejohnfreeman picture thejohnfreeman  路  3Comments

probablykasper picture probablykasper  路  3Comments

tonysyu picture tonysyu  路  3Comments

ghost picture ghost  路  3Comments

ulope picture ulope  路  3Comments