package installation finds wrong header file (?), explodes
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 1.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
setuptools version
setuptools==65.6.3
Python version
3.8 and 3.9
OS
OS X (12.5.1)
Additional environment information
m1 Mac, poetry 1.3.2, pip 22.3.1 and 23.0.1.
Description
pip install gensim fails with pyenv-installed python -- but succeeds with brew-installed python. I believe this is related to https://github.com/pypa/pip/pull/11740 .
I was invoking pip via poetry (one env created with pyenv-installed 3.9.13, one with brew-installed 3.9.13). When the pyenv one got to the pip install gensim stage, under the pyenv python, it failed with this extremely long error.
I believe this is the same error as this seemingly unrelated issue (provided in case it's helpful), and that the important part is here:
In file included from gensim/models/word2vec_inner.c:25:
In file included from /Users/ayelton/.pyenv/versions/3.9.13/include/python3.9/Python.h:25:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdio.h:64:
And that something is wrong with this stdio.h file that Python tries to include (maybe it is actually for Swift and not C++?). I believe further that the brew-installed python + pip are finding the correct C++ headers, because the pip installing in the brew python env worked just fine. But at this point I am out of my depth.
I originally filed this as an issue on pip but they asked me to open it here.
Expected behavior
I expected poetry install gensim to install gensim without without 17,000 lines of a C compiler complaining about nullability.
How to Reproduce
- While on an M1 mac running 12.5.1
- install python 3.9 with pyenv
- use poetry to create a virtualenv with that python
- poetry install gensim==4.3.0
Output
See the linked gist above. (It's very long.)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure using the listed M1 macOS, pyenv Python 3.9, Poetry, and gensim 4.3.0 setup, then compare it with the working Homebrew Python environment. Start with the linked compiler output, Python.h, stdio.h, and pip PR 11740; done means the reported installation completes without the compiler errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100