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.

Invalid dev dependency

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: Ubuntu 18.04
  • Poetry version: Poetry 0.11.5
  • Link of a Gist with the contents of your pyproject.toml file: None

Issue

Doing the following:

git clone https://github.com/sdispater/poetry && cd poetry
poetry install

Poetry fails to install black 18.6b4 with this error using -vvv:

Installing dependencies from lock file


Package operations: 8 installs, 0 updates, 1 removal, 53 skipped

  - Skipping six (1.11.0) Already installed
  - Skipping atomicwrites (1.2.1) Already installed
  - Skipping attrs (18.2.0) Already installed
  - Skipping certifi (2018.8.24) Already installed
  - Skipping chardet (3.0.4) Already installed
  - Skipping colorama (0.3.9) Not needed for the current platform
  - Skipping idna (2.7) Already installed
  - Skipping markupsafe (1.0) Already installed
  - Skipping more-itertools (4.3.0) Already installed
  - Skipping pluggy (0.7.1) Already installed
  - Skipping py (1.6.0) Already installed
  - Skipping pyyaml (3.13) Already installed
  - Skipping tornado (5.1) Already installed
  - Skipping urllib3 (1.23) Already installed
  - Skipping appdirs (1.4.3) Already installed
  - Skipping aspy.yaml (1.1.1) Already installed
  - Skipping cached-property (1.5.1) Already installed
  - Skipping cfgv (1.1.0) Already installed
  - Skipping click (6.7) Already installed
  - Skipping coverage (4.5.1) Already installed
  - Skipping identify (1.1.5) Already installed
  - Skipping jinja2 (2.10) Already installed
  - Skipping livereload (2.5.2) Already installed
  - Skipping lockfile (0.12.2) Already installed
  - Skipping markdown (2.6.11) Already installed
  - Skipping msgpack (0.5.6) Already installed
  - Skipping nodeenv (1.3.2) Already installed
  - Skipping pastel (0.1.0) Already installed
  - Skipping pygments (2.2.0) Already installed
  - Skipping pylev (1.3.0) Already installed
  - Skipping pytest (3.8.0) Already installed
  - Skipping requests (2.19.1) Already installed
  - Skipping toml (0.9.6) Already installed
  - Skipping virtualenv (16.0.0) Already installed
  - Skipping webencodings (0.5.1) Already installed
  - Installing black (18.6b4)
                                                                                                
[VenvCommandError]                                                               
Command ['pip', 'install', '--no-deps', 'black==18.6b4'] errored with the following output:   
Collecting black==18.6b4                                                                      
  Could not find a version that satisfies the requirement black==18.6b4 (from versions: )     
No matching distribution found for black==18.6b4                                              
                                                                                                
Exception trace:
 /home/dimitris/.local/lib/python3.6/site-packages/cleo/application.py in run() at line 94
   status_code = self.do_run(input_, output_)
 /home/dimitris/.local/lib/python3.6/site-packages/poetry/console/application.py in do_run() at line 88
   return super(Application, self).do_run(i, o)
 /home/dimitris/.local/lib/python3.6/site-packages/cleo/application.py in do_run() at line 197
   status_code = command.run(input_, output_)
 /home/dimitris/.local/lib/python3.6/site-packages/poetry/console/commands/command.py in run() at line 77
   return super(BaseCommand, self).run(i, o)
 /home/dimitris/.local/lib/python3.6/site-packages/cleo/commands/base_command.py in run() at line 146
   status_code = self.execute(input_, output_)
 /home/dimitris/.local/lib/python3.6/site-packages/cleo/commands/command.py in execute() at line 107
   return self.handle()
 /home/dimitris/.local/lib/python3.6/site-packages/poetry/console/commands/install.py in handle() at line 50
   return installer.run()
 /home/dimitris/.local/lib/python3.6/site-packages/poetry/installation/installer.py in run() at line 76
   self._do_install(local_repo)
 /home/dimitris/.local/lib/python3.6/site-packages/poetry/installation/installer.py in _do_install() at line 286
   self._execute(op)
 /home/dimitris/.local/lib/python3.6/site-packages/poetry/installation/installer.py in _execute() at line 294
   getattr(self, "_execute_{}".format(method))(operation)
 /home/dimitris/.local/lib/python3.6/site-packages/poetry/installation/installer.py in _execute_install() at line 319
   self._installer.install(operation.package)
 /home/dimitris/.local/lib/python3.6/site-packages/poetry/installation/pip_installer.py in install() at line 76
   self.run(*args)
 /home/dimitris/.local/lib/python3.6/site-packages/poetry/installation/pip_installer.py in run() at line 91
   return self._venv.run("pip", *args, **kwargs)
 /home/dimitris/.local/lib/python3.6/site-packages/poetry/utils/venv.py in run() at line 274
   raise VenvCommandError(e)

The issue is that pip2 doesn’t find the version 18.6b4

/usr/bin/pip2 install -U black==18.6b4                                                               
Collecting black==18.6b4
  Could not find a version that satisfies the requirement black==18.6b4 (from versions: )
No matching distribution found for black==18.6b4

Pip3 does find the version:

 /usr/bin/pip3 install -U black==18.6b4                                                             1 master
Collecting black==18.6b4
  Using cached https://files.pythonhosted.org/packages/4e/b5/575cdaabf1f98ebe50c0ee85b202fcce3b8df1f21d6ed02708bc539674c3/black-18.6b4-py36-none-any.whl
Collecting toml>=0.9.4 (from black==18.6b4)
  Using cached https://files.pythonhosted.org/packages/c7/19/76c3cb84949a0593767b32b9be83a604d8a68c3580ff5d0ee64856b39ade/toml-0.9.6-py2.py3-none-any.whl
Collecting attrs>=17.4.0 (from black==18.6b4)
  Using cached https://files.pythonhosted.org/packages/3a/e1/5f9023cc983f1a628a8c2fd051ad19e76ff7b142a0faf329336f9a62a514/attrs-18.2.0-py2.py3-none-any.whl
Collecting appdirs (from black==18.6b4)
  Using cached https://files.pythonhosted.org/packages/56/eb/810e700ed1349edde4cbdc1b2a21e28cdf115f9faf263f6bbf8447c1abf3/appdirs-1.4.3-py2.py3-none-any.whl
Collecting click>=6.5 (from black==18.6b4)
  Using cached https://files.pythonhosted.org/packages/34/c1/8806f99713ddb993c5366c362b2f908f18269f8d792aff1abfd700775a77/click-6.7-py2.py3-none-any.whl
Installing collected packages: toml, attrs, appdirs, click, black
Successfully installed appdirs-1.4.3 attrs-18.2.0 black-18.6b4 click-6.7 toml-0.9.6

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
pmav99commented, Feb 25, 2019

Black doesn’t have a stable release yet. You need to install it with:

poetry add --dev --allow-prereleases black
0reactions
M5oulcommented, Jun 4, 2019

Corresponding ticket in Black https://github.com/python/black/issues/517.

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm install won't install devDependencies - Stack Overflow
I don't understand why npm install doesn't install devDependencies too, but installs only dependencies. What could be the reason? How can I fix ......
Read more >
Common errors | npm Docs
Invalid JSON · Possible temporary npm registry glitch, or corrupted local server cache. Run npm cache clean and/or try again later. · This...
Read more >
Configuring your application's dependencies - AWS Elastic ...
If you want to install development dependencies on your environment instances, set the NPM_USE_PRODUCTION environment property to false .
Read more >
NPM Dependency errors? Then You're doing it wrong. - Medium
The answer is bad dependency tree management. This is a common problem within the NPM ecosystem which every developer faces. Libraries are changing...
Read more >
Understanding npm ERR! code ELSPROBLEMS with your ...
A dependency in your package.json file is not installed; An invalid package is found in your node_modules folder.
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