poetry install fails with [EnvCommandError]
See original GitHub issue- 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).
- 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.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8
Top GitHub Comments
I had this happen to me in docker containers. Updating pip and trying again worked for me.
poetry install
fails on installing micc because it recognises the directorymicc/templates
(containing the cookiecutter templates) as a sub-package ofmicc
rather than as a data directory. This is becausemicc/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.