Skip to content

EnvCommandError when using Python Poetry with Gitpod #1776

Closed
@heitorlessa

Description

@heitorlessa

Describe the bug

When using Gitpod to bootstrap an open source project, Poetry (dep management) fails when trying to install the project as an editable package -- It seems that the environment under Gitpod is customized as I can't reproduce anywhere else.

[EnvCommandError]
Command ['/home/gitpod/.cache/pypoetry/virtualenvs/aws-lambda-powertools-YwoV7uxh-py3.8/bin/pip', 'install', '--no-deps', '-e', '/workspace/aws-lambda-powertools-python'] errored with the following return code 1, and output: 
Obtaining file:///workspace/aws-lambda-powertools-python
Installing collected packages: aws-lambda-powertools
  Running setup.py develop for aws-lambda-powertools
    ERROR: Command errored out with exit status 1:
     command: /home/gitpod/.cache/pypoetry/virtualenvs/aws-lambda-powertools-YwoV7uxh-py3.8/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/workspace/aws-lambda-powertools-python/setup.py'"'"'; __file__='"'"'/workspace/aws-lambda-powertools-python/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps --user --prefix=
         cwd: /workspace/aws-lambda-powertools-python/
    Complete output (6 lines):
    usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: setup.py --help [cmd1 cmd2 ...]
       or: setup.py --help-commands
       or: setup.py cmd --help
    
    error: option --user not recognized
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/gitpod/.cache/pypoetry/virtualenvs/aws-lambda-powertools-YwoV7uxh-py3.8/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/workspace/aws-lambda-powertools-python/setup.py'"'"'; __file__='"'"'/workspace/aws-lambda-powertools-python/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps --user --prefix= Check the logs for full command output.
WARNING: You are using pip version 19.2.3, however version 20.2.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Steps to reproduce

  1. Instantiate a Gitpod workplace: https://gitpod.io/#https://github.com/awslabs/aws-lambda-powertools-python
  2. Bootstrap development: make dev

Expected behavior

Project bootstrapping to complete without errors

Additional information

https://gitpod.io/#https://github.com/awslabs/aws-lambda-powertools-python

Example repository

https://github.com/awslabs/aws-lambda-powertools-python

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions