Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'dict' object has no attribute '__NUMPY_SETUP__'. Did you mean: 'get_data_files'? #3546

Open
Zethson opened this issue Jul 17, 2024 · 1 comment

Comments

@Zethson
Copy link

Zethson commented Jul 17, 2024

Problem description

Trying to build my documentation with uv which also installs gensim as a transitive dependency.

Steps/code/corpus to reproduce

uv pip install gensim

but it leads to

error: Failed to prepare distributions
  Caused by: Failed to fetch wheel: gensim==4.1.2
  Caused by: Failed to build: `gensim==4.1.2`
  Caused by: Build backend failed to build wheel through `build_wheel()` with exit status: 1
--- stdout:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-311
creating build/lib.linux-x86_64-cpython-311/gensim
copying gensim/nosy.py -> build/lib.linux-x86_64-cpython-311/gensim
copying gensim/matutils.py -> build/lib.linux-x86_64-cpython-311/gensim
copying gensim/downloader.py -> build/lib.linux-x86_64-cpython-311/gensim
copying gensim/utils.py -> build/lib.linux-x86_64-cpython-311/gensim
copying gensim/__init__.py -> build/lib.linux-x86_64-cpython-311/gensim
copying gensim/interfaces.py -> build/lib.linux-x86_64-cpython-311/gensim
creating build/lib.linux-x86_64-cpython-311/gensim/topic_coherence
copying gensim/topic_coherence/direct_confirmation_measure.py -> build/lib.linux-x86_64-cpython-311/gensim/topic_coherence
copying gensim/topic_coherence/segmentation.py -> build/lib.linux-x86_64-cpython-311/gensim/topic_coherence
copying gensim/topic_coherence/text_analysis.py -> build/lib.linux-x86_64-cpython-311/gensim/topic_coherence
copying gensim/topic_coherence/indirect_confirmation_measure.py -> build/lib.linux-x86_64-cpython-311/gensim/topic_coherence
copying gensim/topic_coherence/aggregation.py -> build/lib.linux-x86_64-cpython-311/gensim/topic_coherence
copying gensim/topic_coherence/__init__.py -> build/lib.linux-x86_64-cpython-311/gensim/topic_coherence
copying gensim/topic_coherence/probability_estimation.py -> build/lib.linux-x86_64-cpython-311/gensim/topic_coherence
creating build/lib.linux-x86_64-cpython-311/gensim/scripts
copying gensim/scripts/benchmark.py -> build/lib.linux-x86_64-cpython-311/gensim/scripts
copying gensim/scripts/make_wiki_online_nodebug.py -> build/lib.linux-x86_64-cpython-311/gensim/scripts
copying gensim/scripts/word2vec_standalone.py -> build/lib.linux-x86_64-cpython-311/gensim/scripts
copying gensim/scripts/glove2word2vec.py -> build/lib.linux-x86_64-cpython-311/gensim/scripts
copying gensim/scripts/__init__.py -> build/lib.linux-x86_64-cpython-311/gensim/scripts
copying gensim/scripts/segment_wiki.py -> build/lib.linux-x86_64-cpython-311/gensim/scripts
copying gensim/scripts/make_wikicorpus.py -> build/lib.linux-x86_64-cpython-311/gensim/scripts
copying gensim/scripts/make_wiki_online.py -> build/lib.linux-x86_64-cpython-311/gensim/scripts
copying gensim/scripts/make_wiki.py -> build/lib.linux-x86_64-cpython-311/gensim/scripts
copying gensim/scripts/package_info.py -> build/lib.linux-x86_64-cpython-311/gensim/scripts
copying gensim/scripts/word2vec2tensor.py -> build/lib.linux-x86_64-cpython-311/gensim/scripts
creating build/lib.linux-x86_64-cpython-311/gensim/similarities
copying gensim/similarities/docsim.py -> build/lib.linux-x86_64-cpython-311/gensim/similarities
copying gensim/similarities/annoy.py -> build/lib.linux-x86_64-cpython-311/gensim/similarities
copying gensim/similarities/levenshtein.py -> build/lib.linux-x86_64-cpython-311/gensim/similarities
copying gensim/similarities/__init__.py -> build/lib.linux-x86_64-cpython-311/gensim/similarities
copying gensim/similarities/nmslib.py -> build/lib.linux-x86_64-cpython-311/gensim/similarities
copying gensim/similarities/termsim.py -> build/lib.linux-x86_64-cpython-311/gensim/similarities
creating build/lib.linux-x86_64-cpython-311/gensim/parsing
copying gensim/parsing/preprocessing.py -> build/lib.linux-x86_64-cpython-311/gensim/parsing
copying gensim/parsing/__init__.py -> build/lib.linux-x86_64-cpython-311/gensim/parsing
copying gensim/parsing/porter.py -> build/lib.linux-x86_64-cpython-311/gensim/parsing
creating build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_nmf.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_ensemblelda.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_corpora_dictionary.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_ldamodel.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_doc2vec.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_dtm.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_tfidfmodel.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_phrases.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_matutils.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/basetmtests.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/utils.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_word2vec.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_normmodel.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_keyedvectors.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_ldaseqmodel.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_rpmodel.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_parsing.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_segmentation.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_glove2word2vec.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/simspeed.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/__init__.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_atmodel.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_lee.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_translation_matrix.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_sharded_corpus.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_api.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/simspeed2.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_lda_callback.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_scripts.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/svd_error.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_lsimodel.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_tmdiff.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_aggregation.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_utils.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_corpora.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_logentropy_model.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_similarity_metrics.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_text_analysis.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_coherencemodel.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_fasttext.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_similarities.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_poincare.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_datatype.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_hdpmodel.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_corpora_hashdictionary.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_probability_estimation.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_indirect_confirmation.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_direct_confirmation.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_miislita.py -> build/lib.linux-x86_64-cpython-311/gensim/test
copying gensim/test/test_big.py -> build/lib.linux-x86_64-cpython-311/gensim/test
creating build/lib.linux-x86_64-cpython-311/gensim/models
copying gensim/models/keyedvectors.py -> build/lib.linux-x86_64-cpython-311/gensim/models
copying gensim/models/lsi_dispatcher.py -> build/lib.linux-x86_64-cpython-311/gensim/models
copying gensim/models/doc2vec.py -> build/lib.linux-x86_64-cpython-311/gensim/models
copying gensim/models/lsi_worker.py -> build/lib.linux-x86_64-cpython-311/gensim/models
copying gensim/models/tfidfmodel.py -> build/lib.linux-x86_64-cpython-311/gensim/models
copying gensim/models/phrases.py -> build/lib.linux-x86_64-cpython-311/gensim/models
copying gensim/models/logentropy_model.py -> build/lib.linux-x86_64-cpython-311/gensim/models
copying gensim/models/normmodel.py -> build/lib.linux-x86_64-cpython-311/gensim/models
copying gensim/models/nmf.py -> build/lib.linux-x86_64-cpython-311/gensim/models
copying gensim/models/atmodel.py -> build/lib.linux-x86_64-cpython-311/gensim/models
copying gensim/models/lsimodel.py -> build/lib.linux-x86_64-cpython-311/gensim/models
copying gensim/models/poincare.py -> build/lib.linux-x86_64-cpython-311/gensim/models
copying gensim/models/word2vec.py -> build/lib.linux-x86_64-cpython-311/gensim/models
copying gensim/models/translation_matrix.py -> build/lib.linux-x86_64-cpython-311/gensim/models
copying gensim/models/ldamulticore.py -> build/lib.linux-x86_64-cpython-311/gensim/models
copying gensim/models/__init__.py -> build/lib.linux-x86_64-cpython-311/gensim/models
copying gensim/models/lda_dispatcher.py -> build/lib.linux-x86_64-cpython-311/gensim/models
copying gensim/models/rpmodel.py -> build/lib.linux-x86_64-cpython-311/gensim/models
copying gensim/models/ldaseqmodel.py -> build/lib.linux-x86_64-cpython-311/gensim/models
copying gensim/models/callbacks.py -> build/lib.linux-x86_64-cpython-311/gensim/models
copying gensim/models/coherencemodel.py -> build/lib.linux-x86_64-cpython-311/gensim/models
copying gensim/models/lda_worker.py -> build/lib.linux-x86_64-cpython-311/gensim/models
copying gensim/models/ldamodel.py -> build/lib.linux-x86_64-cpython-311/gensim/models
copying gensim/models/fasttext.py -> build/lib.linux-x86_64-cpython-311/gensim/models
copying gensim/models/basemodel.py -> build/lib.linux-x86_64-cpython-311/gensim/models
copying gensim/models/ensemblelda.py -> build/lib.linux-x86_64-cpython-311/gensim/models
copying gensim/models/_fasttext_bin.py -> build/lib.linux-x86_64-cpython-311/gensim/models
copying gensim/models/hdpmodel.py -> build/lib.linux-x86_64-cpython-311/gensim/models
creating build/lib.linux-x86_64-cpython-311/gensim/corpora
copying gensim/corpora/indexedcorpus.py -> build/lib.linux-x86_64-cpython-311/gensim/corpora
copying gensim/corpora/mmcorpus.py -> build/lib.linux-x86_64-cpython-311/gensim/corpora
copying gensim/corpora/dictionary.py -> build/lib.linux-x86_64-cpython-311/gensim/corpora
copying gensim/corpora/textcorpus.py -> build/lib.linux-x86_64-cpython-311/gensim/corpora
copying gensim/corpora/wikicorpus.py -> build/lib.linux-x86_64-cpython-311/gensim/corpora
copying gensim/corpora/bleicorpus.py -> build/lib.linux-x86_64-cpython-311/gensim/corpora
copying gensim/corpora/__init__.py -> build/lib.linux-x86_64-cpython-311/gensim/corpora
copying gensim/corpora/lowcorpus.py -> build/lib.linux-x86_64-cpython-311/gensim/corpora
copying gensim/corpora/csvcorpus.py -> build/lib.linux-x86_64-cpython-311/gensim/corpora
copying gensim/corpora/sharded_corpus.py -> build/lib.linux-x86_64-cpython-311/gensim/corpora
copying gensim/corpora/ucicorpus.py -> build/lib.linux-x86_64-cpython-311/gensim/corpora
copying gensim/corpora/svmlightcorpus.py -> build/lib.linux-x86_64-cpython-311/gensim/corpora
copying gensim/corpora/malletcorpus.py -> build/lib.linux-x86_64-cpython-311/gensim/corpora
copying gensim/corpora/hashdictionary.py -> build/lib.linux-x86_64-cpython-311/gensim/corpora
copying gensim/corpora/opinosiscorpus.py -> build/lib.linux-x86_64-cpython-311/gensim/corpora
running egg_info
writing gensim.egg-info/PKG-INFO
writing dependency_links to gensim.egg-info/dependency_links.txt
writing requirements to gensim.egg-info/requires.txt
writing top-level names to gensim.egg-info/top_level.txt
--- stderr:
Traceback (most recent call last):
  File "<string>", line 11, in <module>
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/build_meta.py", line 415, in build_wheel
    return self._build_with_temp_dir(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/build_meta.py", line 397, in _build_with_temp_dir
    self.run_setup()
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/build_meta.py", line 497, in run_setup
    super().run_setup(setup_script=setup_script)
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/build_meta.py", line 313, in run_setup
    exec(code, locals())
  File "<string>", line 339, in <module>
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/__init__.py", line 103, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 184, in setup
    return run_commands(dist)
           ^^^^^^^^^^^^^^^^^^
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
    dist.run_commands()
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 970, in run_commands
    self.run_command(cmd)
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/dist.py", line 974, in run_command
    super().run_command(command)
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 989, in run_command
    cmd_obj.run()
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/command/bdist_wheel.py", line 373, in run
    self.run_command("build")
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
    self.distribution.run_command(command)
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/dist.py", line 974, in run_command
    super().run_command(command)
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 989, in run_command
    cmd_obj.run()
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
    self.distribution.run_command(command)
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/dist.py", line 974, in run_command
    super().run_command(command)
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 989, in run_command
    cmd_obj.run()
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/command/build_py.py", line 75, in run
    self.build_package_data()
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/command/build_py.py", line 172, in build_package_data
    for target, srcfile in self._get_package_data_output_mapping():
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/command/build_py.py", line 164, in _get_package_data_output_mapping
    for package, src_dir, build_dir, filenames in self.data_files:
                                                  ^^^^^^^^^^^^^^^
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/command/build_py.py", line 84, in __getattr__
    self.data_files = self._get_data_files()
                      ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/command/build_py.py", line 96, in _get_data_files
    self.analyze_manifest()
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/command/build_py.py", line 194, in analyze_manifest
    self.run_command('egg_info')
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
    self.distribution.run_command(command)
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/dist.py", line 974, in run_command
    super().run_command(command)
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 989, in run_command
    cmd_obj.run()
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 321, in run
    self.find_sources()
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 329, in find_sources
    mm.run()
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 550, in run
    self.add_defaults()
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 588, in add_defaults
    sdist.add_defaults(self)
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/command/sdist.py", line 102, in add_defaults
    super().add_defaults()
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line 250, in add_defaults
    self._add_defaults_ext()
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line 334, in _add_defaults_ext
    build_ext = self.get_finalized_command('build_ext')
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 303, in get_finalized_command
    cmd_obj.ensure_finalized()
  File "/home/docs/.cache/uv/builds-v0/.tmp3BpLE6/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
    self.finalize_options()
  File "<string>", line 109, in finalize_options
AttributeError: 'dict' object has no attribute '__NUMPY_SETUP__'. Did you mean: 'get_data_files'?
---

https://readthedocs.org/projects/ehrapy/builds/25030940/

Versions

Can't provide the exact versions because it's on RTD, but Python 3.11, Numpy < 2.0.0

@poudrouxj
Copy link

In its current form, uv won't be the right fit for all projects. pip is a mature and stable tool, with extensive support for an extremely wide range of use cases and a focus on compatibility. While uv supports a large fraction of the pip interface, it lacks support for some of its legacy features, like .egg distributions.

https://astral.sh/blog/uv

pip install gensim works though 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants