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.

Impossible to install Black 19.3b0

See original GitHub issue

Issue

I’m trying to install Black, and I’m kind of succeeding thanks to comments in #767. However, the version of Black I’m getting is not the latest one:

> poetry run black --version
black, version 18.9b0

The latest one being 19.3b0.

I was wondering if this could be due to black not respecting semver, so I put the version number manually to see what happens, but turns out it’s not helping much.

black = {version = "19.3b0", allows-prereleases = true}
[SolverProblemError]                                                                    
Because typefit depends on black (19.3b0) which doesn't match any versions, version solving failed.

Thanks for your help!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
hitshydevcommented, Mar 5, 2020

I’m experiencing a similar problem by trying to add essentia to my dependencies. I’m also using elementary OS. But I solved it, here is how:

I edited the first line of ~/.poetry/bin/poetry to #!/usr/bin/env python3

Here is some explanation: elementary OS comes with preinstalled python 2.x , that’s why the python environment variable is already occupied and one has to run sudo apt install python3 to get python 3.x which then occupies the python3 environment variable. I would guess that many ubuntu based systems are installing python 3.* in this way that’s why sometimes poetry won’t run at all or is behaving in an unexpected manner. But that said, the bug can only be reproduced when running poetry with python 2.x (2.7 in my case).

1reaction
Rosswellcommented, Dec 20, 2019

I can’t reproduce either. poetry init resulted in

[tool.poetry]
name = "test"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]

[tool.poetry.dependencies]
python = "^3.7"

[tool.poetry.dev-dependencies]

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"

then using the same command for installation

$ poetry add -D --allow-prereleases black
Creating virtualenv test-wix2tCvA-py3.7 in /Users/rblanchard/Library/Caches/pypoetry/virtualenvs
Using version ^19.10b0 for black

Updating dependencies
Resolving dependencies... (1.0s)

Writing lock file


Package operations: 8 installs, 0 updates, 0 removals

  - Installing appdirs (1.4.3)
  - Installing attrs (19.3.0)
  - Installing click (7.0)
  - Installing pathspec (0.6.0)
  - Installing regex (2019.12.19)
  - Installing toml (0.10.0)
  - Installing typed-ast (1.4.0)
  - Installing black (19.10b0)
$ poetry --version
Poetry version 1.0.0
$ python3 -V
Python 3.7.4
Read more comments on GitHub >

github_iconTop Results From Across the Web

Impossible to install Black 19.3b0 · Issue #1505 - GitHub
I have black = "^19.3b0" , which currently resolves to 19.10b0 . Everything is working correctly with Poetry 1.0.0b3 under Python 3.7 and...
Read more >
black 19.3b0 - PyPI
Black can be installed by running pip install black . It requires Python 3.6.0+ to run but you can reformat Python 2 code...
Read more >
Łukasz Langa on Twitter: "It's done. You can test the latest and ...
It's done. You can test the latest and greatest here: pip install black==19.10b0 Thanks a million to everybody who helped with this, there's ......
Read more >
18 : Cleaning Our Codebase - FastapiTutorial
We will not be installing black individually, Instead, we will keep it as a part of our pre-commit pipeline. For that first, we...
Read more >
Lesson 18: Python style
I have recently found Black to be a very useful tool for style. It's self-ascribed adjective is "uncompromising." Black does not pay any...
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