Skip to content

Poetry with virtualenvs.create false installs packages into the wrong place on Ubuntu #6459

@amcinnes

Description

@amcinnes
  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

Issue

To reproduce the issue:

docker run --rm -it ubuntu:20.04@sha256:af5efa9c28de78b754777af9b4d850112cad01899a5d37d2617bb94dc63a49aa
apt-get update && apt-get -y install python3-pip
python3 -m pip install poetry==1.2.0
poetry config virtualenvs.create false
poetry init -n
poetry add awscli
aws --version

Expected behaviour (seen with poetry 1.1.14): the aws command runs successfully.

# aws --version
aws-cli/1.25.70 Python/3.8.10 Linux/5.19.7-arch1-1 botocore/1.27.69

Observed behaviour (with poetry 1.2.0): the aws command fails.

# aws --version
Traceback (most recent call last):
  File "/usr/bin/aws", line 19, in <module>
    import awscli.clidriver
ModuleNotFoundError: No module named 'awscli'

This seems to be because with poetry 1.2.0, awscli has been installed into /usr/lib/python3.8/site-packages/awscli which is not in the Python path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/installerRelated to the dependency installerkind/bugSomething isn't working as expectedstatus/external-issueIssue is caused by external project (platform, dep, etc)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions