poetry install fails with [EnvCommandError]

Created on 24 Oct 2019  路  5Comments  路  Source: python-poetry/poetry

  • [x] I am on the latest Poetry version.
  • [x] 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).
  • MACOS catalina
  • Poetry version: 0,12.7

Issue

git clone https://github.com/etijskens/micc
cd micc
poetry install
Updating dependencies
Resolving dependencies... (5.1s)

Writing lock file

Package operations: 38 installs, 0 updates, 0 removals

  • Installing markupsafe (1.1.1)
  • Installing python-dateutil (2.8.0)
  • Installing pytz (2019.3)
  • Installing alabaster (0.7.12)
  • Installing arrow (0.15.2)
  • Installing babel (2.7.0)
  • Installing docutils (0.15.2)
  • Installing imagesize (1.1.0)
  • Installing jinja2 (2.10.3)
  • Installing packaging (19.2)
  • Installing pygments (2.4.2)
  • Installing snowballstemmer (2.0.0)
  • Installing sphinxcontrib-applehelp (1.0.1)
  • Installing sphinxcontrib-devhelp (1.0.1)
  • Installing sphinxcontrib-htmlhelp (1.0.2)
  • Installing sphinxcontrib-jsmath (1.0.1)
  • Installing sphinxcontrib-qthelp (1.0.2)
  • Installing sphinxcontrib-serializinghtml (1.1.3)
  • Installing atomicwrites (1.3.0)
  • Installing binaryornot (0.4.4)
  • Installing click (7.0)
  • Installing future (0.18.1)
  • Installing jinja2-time (0.2.0)
  • Installing pbr (5.4.3)
  • Installing pluggy (0.13.0)
  • Installing poyo (0.5.0)
  • Installing py (1.8.0)
  • Installing sphinx (2.1.2)
  • Installing wcwidth (0.1.7)
  • Installing whichcraft (0.6.1)
  • Installing bump2version (0.5.11)
  • Installing cookiecutter (1.6.0)
  • Installing numpy (1.17.3)
  • Installing pybind11 (2.4.3)
  • Installing pytest (4.6.6)
  • Installing sphinx-click (2.3.0)
  • Installing sphinx-rtd-theme (0.4.3)
  • Installing walkdir (0.4.1)
  • Installing micc (0.7.4)

[EnvCommandError]
Command ['/Users/etijskens/software/dev/workspace/micc/venv_micc/bin/python', '-m', 'pip', 'install', '-e', '/Users/etijskens/software/dev/workspace/micc'] errored with th
e following return code 1, and output:
Obtaining file:///Users/etijskens/software/dev/workspace/micc
ERROR: Command errored out with exit status 1:
command: /Users/etijskens/software/dev/workspace/micc/venv_micc/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/Users/etijskens/software/dev/work
space/micc/setup.py'"'"'; __file__='"'"'/Users/etijskens/software/dev/workspace/micc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replac
e('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info
cwd: /Users/etijskens/software/dev/workspace/micc/
Complete output (9 lines):
running egg_info
creating micc.egg-info
writing micc.egg-info/PKG-INFO
writing dependency_links to micc.egg-info/dependency_links.txt
writing entry points to micc.egg-info/entry_points.txt
writing requirements to micc.egg-info/requires.txt
writing top-level names to micc.egg-info/top_level.txt
writing manifest file 'micc.egg-info/SOURCES.txt'
error: package directory 'micc/templates/package-base/{{cookiecutter/project_name}}/tests' does not exist
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

install [--no-dev] [--dry-run] [-E|--extras EXTRAS] [--develop DEVELOP]

poetry complains that the file 'micc/templates/package-base/{{cookiecutter/project_name}}/tests' does not exist, which is correct, but this should be
'micc/templates/package-base/{{cookiecutter.project_name}}/tests' instead of
'micc/templates/package-base/{{cookiecutter/project_name}}/tests'

I have no clue where the file name is going wrong. The file is part of a cookiecutter template and is part of the package. somewhere the dot between {{cookiecutter and project_name}} is replaced with a slash.

Bug

All 5 comments

The issue is also present in poetry 1.0.0b1

the issue happens both on macOS Catalina and ubuntu 19.10

poetry install fails on installing micc because it recognises the directory micc/templates(containing the cookiecutter templates) as a sub-package of micc rather than as a data directory. This is because micc/templates contains.pyfiles, This can be avoided by replacing the"py"extension in these filenames with a cookiecutter variable{{cookiecutter.py}}` and set the variable to "py". Now the directory is no longer recognised as a sub-package.

I am having the same issue installing packages such as scipy (version 1.4.1). Any suggestions?

@anandkamat05 The root cause of the issue from the original ticket has been clearly identified. It is a solved issue. Are you really having the same issue? Are you having an issue with micc? It seems like you are seeing a different issue, if any. Please post the full command and error message.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Euphorbium picture Euphorbium  路  3Comments

thejohnfreeman picture thejohnfreeman  路  3Comments

ambv picture ambv  路  3Comments

nikaro picture nikaro  路  3Comments

jhrmnn picture jhrmnn  路  3Comments