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.

[development] Unable to install poetry's dependencies

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).
  • OS version and name: macOS High Sierra 10.13
  • Poetry version: 0.12.17
  • Link of a Gist with the contents of your pyproject.toml file: It’s this repo, self.

Issue

Following CONTRIBUTING.md, I cloned and cd'd into the repo and then when I run poetry install I get:

Installing dependencies from lock file

[NonExistentKey]
'Key "hashes" does not exist.'

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

In verbose mode:

Using virtualenv: /Users/<user>/Library/Caches/pypoetry/virtualenvs/poetry-py3.7
Installing dependencies from lock file

[NonExistentKey]
'Key "hashes" does not exist.'

Exception trace:
 /Users/<user>/.poetry/lib/poetry/_vendor/py3.7/cleo/application.py in run() at line 94
   status_code = self.do_run(input_, output_)
 /Users/<user>/.poetry/lib/poetry/console/application.py in do_run() at line 88
   return super(Application, self).do_run(i, o)
 /Users/<user>/.poetry/lib/poetry/_vendor/py3.7/cleo/application.py in do_run() at line 197
   status_code = command.run(input_, output_)
 /Users/<user>/.poetry/lib/poetry/console/commands/command.py in run() at line 77
   return super(BaseCommand, self).run(i, o)
 /Users/<user>/.poetry/lib/poetry/_vendor/py3.7/cleo/commands/base_command.py in run() at line 146
   status_code = self.execute(input_, output_)
 /Users/<user>/.poetry/lib/poetry/_vendor/py3.7/cleo/commands/command.py in execute() at line 107
   return self.handle()
 /Users/<user>/.poetry/lib/poetry/console/commands/install.py in handle() at line 55
   return_code = installer.run()
 /Users/<user>/.poetry/lib/poetry/installation/installer.py in run() at line 73
   self._do_install(local_repo)
 /Users/<user>/.poetry/lib/poetry/installation/installer.py in _do_install() at line 169
   locked_repository = self._locker.locked_repository(True)
 /Users/<user>/.poetry/lib/poetry/packages/locker.py in locked_repository() at line 86
   package.hashes = lock_data["metadata"]["hashes"][info["name"]]
 /Users/<user>/.poetry/lib/poetry/_vendor/py3.7/tomlkit/items.py in __getitem__() at line 981
   return self._value[key]
 /Users/<user>/.poetry/lib/poetry/_vendor/py3.7/tomlkit/container.py in __getitem__() at line 524
   raise NonExistentKey(key)

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

Also, this occurs with both Python 3.7 and Python 2.7.

I went like 10 commits back and it still occurred, as did with 20 commits back, and 25 commits back. Eventually I narrowed it down to https://github.com/sdispater/poetry/commit/e54f3907f1e110813b690febcfb89ebd75224bea being the root cause. The commit before that (or more before it) work fine and poetry install works on them.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:9
  • Comments:24 (3 by maintainers)

github_iconTop GitHub Comments

14reactions
mbelangcommented, Jan 8, 2020

If you delete the lock and regenerate should fix the problem.

10reactions
agilgur5commented, Oct 28, 2019

@b0g3r yep, using 1.0.0b3 worked to install. That leads to a few follow-ups though:

  1. Why did https://github.com/sdispater/poetry/commit/e54f3907f1e110813b690febcfb89ebd75224bea break compatibility with Poetry stable (i.e. 0.12.17)? Not sure if it was intentional / meant to break compat or not.
  2. In its pyproject.toml, Poetry doesn’t actually specify a build-system, which would normally list which version of poetry it depends on to work. I’m assuming there’s a reason for that, but that would be the root cause of this type of issue, no?
  3. In lieu of 2, assuming it can’t be specified, this should probably be documented in CONTRIBUTING.md. I can add a PR for that, but not sure what the min version required to use master is (and if that differs for develop).
Read more comments on GitHub >

github_iconTop Results From Across the Web

Poetry build does not install build dependencies (affects both ...
If I install Cython globally but then activate the virtual env (which doesn't have Cython), then poetry install and poetry build still fail....
Read more >
Commands | Documentation | Poetry - Python dependency ...
The install command reads the pyproject.toml file from the current project, resolves the dependencies, and installs them. poetry install. If there is a...
Read more >
How To Install Poetry to Manage Python Dependencies on ...
In its current state, your project has no dependencies other than Python itself. Poetry can add new dependencies to your project directly from ......
Read more >
Dependency Management With Python Poetry
A dependency manager like Python Poetry helps you specify, install, and resolve external packages in your projects.
Read more >
Poetry not installing the packages in the venv - Stack Overflow
2 Answers 2 · I rename the lib/python3.9 to another name and I ran poetry install again. · So the dependencies were (re)installed...
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