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.

Unable to install on Python 3.11

See original GitHub issue

Describe the bug

Due to the use of the cchardet dependency, which seems to have been abandoned (PyYoshi/cChardet#77), BlackSheep fails to install on Python 3.11:

/usr/bin/clang -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -Isrc/ext/uchardet/src -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c src/cchardet/_cchardet.cpp -o build/temp.macosx-12.0-x86_64-cpython-311/src/cchardet/_cchardet.o
src/cchardet/_cchardet.cpp:196:12: fatal error: 'longintrepr.h' file not found
  #include "longintrepr.h"
           ^~~~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1

EDIT: After manually installing Cython, I can bypass the above error, but now get the same error for blacksheep directly:

/usr/bin/clang -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c blacksheep/url.c -o build/temp.macosx-12.0-x86_64-cpython-311/blacksheep/url.o -O2
blacksheep/url.c:198:12: fatal error: 'longintrepr.h' file not found
  #include "longintrepr.h"
           ^~~~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1

Seems to be related to cython/cython#4461.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
RobertoPrevatocommented, Oct 28, 2022

@mohd-akram thanks for the information, I’ll look into charset_normalizer. For now, this specific issue can be closed. Before I saw your comment, I released the new version 1.2.8 to PyPI, and it includes wheel packages for Python 3.11.

1reaction
rodolfolottincommented, Oct 28, 2022

@RobertoPrevato thank you very much!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot install PyTorch with Python 3.11 (Windows)
I installed everything through pip which worked fine until getting to Pytorch. I get this error: "ERROR: Could not find a version that...
Read more >
Could not install in Python 3.11, error: legacy-install-failure
I was trying to install Matplotlib on my Mac via pip. I am on MacOS 12.4, Have python 3.11.0b1 installed via pyenv.
Read more >
Pygame package cant install - Discussions on Python.org
[Edit] There are pre-built wheels on PyPI up to Python 3.10, so for Python 3.11 it has to be built from source, and...
Read more >
How to Install Python on Windows in 5 Minutes - DataFlair
The Python setup may fail if you don't have Windows Service Pack 1 (SP1) installed on your computer. It is a requirement for...
Read more >
When should you upgrade to Python 3.11?
When I tried to install it on Python 3.11 on the day of 3.11's release, things don't go well: $ python3.11 -m pip...
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