question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 4 years ago
  • Comments:8

github_iconTop GitHub Comments

7reactions
deepiocommented, Apr 19, 2021

I had this happen to me in docker containers. Updating pip and trying again worked for me.

pip install -U pip
poetry install
2reactions
etijskenscommented, Nov 11, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[EnvCommandError] returned on `poetry install` and `poetry env`
I just installed python 3.9 from windows store and installed poetry version 1.1.4. Here is the error message: $ poetry -V Poetry version...
Read more >
Poetry install fails with EnvCommandError: looks for version ...
I had this same error because for some reason poetry install always failed to create a virtual enviroment path in %APPDATA% .
Read more >
EnvCommandError in Windows using Poetry - Random Wits
Recently poetry has been crashing on my Windows machine. However, I have not encountered this issue in other platform like Linux. Folks who...
Read more >
EnvCommandError - cannot get django tutorial to deploy
I created an environment variable to get render to use python 3.8.2 but when deploying I get the following EnvCommandError errors:.
Read more >
Commands | master | Documentation | Poetry - Python ...
The install command reads the pyproject.toml file from the current ... --skip-existing : Ignore errors from files already existing in the repository.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found