Skip to content

Poetry using the wrong Python version (not related to pyenv) #655

@zmitchell

Description

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

Question

I'm having an issue adding a package to a project because poetry is picking up on the wrong Python version. I'm pretty confident that something has gone awry in my system, but I'm doing my best to salvage the situation and not have to go through the whole process of installing Raspbian from scratch on this Raspberry Pi. I installed poetry using the recommended method (curl ...). Can you point me in the right direction? As mentioned in the title, I'm not using pyenv. All of the relevant issues I found were related to pyenv, so I'm not really sure how to get poetry to use the correct Python.

Here are some terminal outputs to help you diagnose the issue:

pi@widget:temp_logger$ python --version
Python 3.5.3
pi@widget:temp_logger!$ sudo python --version
Python 2.7.13
pi@widget:temp_logger$ poetry --version
Poetry 0.12.9
pi@widget:temp_logger$ poetry debug:info

Poetry
======

 * Version: 0.12.9
 * Python:  2.7.13


Virtualenv
==========

 * Python:         2.7.13
 * Implementation: CPython
 * Path:           NA


System
======

 * Platform: linux2
 * OS:       posix
 * Python:   /usr


pi@widget:temp_logger$ poetry add adafruit-blinka

[RuntimeError]
The current Python version (2.7.13) is not supported by the project (^3.5)
Please activate a compatible Python version.

add [-D|--dev] [--git GIT] [--path PATH] [-E|--extras EXTRAS] [--optional] [--python PYTHON] [--platform PLATFORM] [--allow-prereleases] [--dry-run] [--] <name> (<name>)...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions