samhaswon / bible_search

A Python package for searching multiple versions of the Bible
GNU General Public License v3.0
2 stars 1 forks source link

Installation fails, import fails #4

Closed QATester35D closed 7 months ago

QATester35D commented 7 months ago

Installation issue. I'm trying to use your multi_bible_search package and get errors during the installation and in Visual Studio Code the import fails for multi_bible_search. I have the following versions: Python 3.12.3 pip 24.0 Name: wheel Version: 0.43.0 Name: setuptools Version: 69.5.1

I've tried installing using these two ways but get the same results. From the python directory ..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip I've tried running both of these commands: py -m pip install "C:\Python libraries\multi_bible_search-1.0.0" pip install multi_bible_search

I get: C:\Users\shawn\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip>pip install multi_bible_search Collecting multi_bible_search Downloading multi_bible_search-1.0.0.tar.gz (27.2 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 27.2/27.2 MB 14.5 MB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Building wheels for collected packages: multi_bible_search Building wheel for multi_bible_search (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for multi_bible_search (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [94 lines of output] running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-cpython-312 creating build\lib.win-amd64-cpython-312\ctranslate copying src\ctranslate__init__.py -> build\lib.win-amd64-cpython-312\ctranslate creating build\lib.win-amd64-cpython-312\multi_bible_search copying src\multi_bible_search\bible_search.py -> build\lib.win-amd64-cpython-312\multi_bible_search copying src\multi_bible_search\translate.py -> build\lib.win-amd64-cpython-312\multi_bible_search copying src\multi_bible_search__init__.py -> build\lib.win-amd64-cpython-312\multi_bible_search running egg_info writing src\multi_bible_search.egg-info\PKG-INFO writing dependency_links to src\multi_bible_search.egg-info\dependency_links.txt writing top-level names to src\multi_bible_search.egg-info\top_level.txt reading manifest file 'src\multi_bible_search.egg-info\SOURCES.txt' adding license file 'LICENSE' writing manifest file 'src\multi_bible_search.egg-info\SOURCES.txt' C:\Users\shawn\AppData\Local\Temp\pip-build-env-vshcwxb4\overlay\Lib\site-packages\setuptools\command\build_py.py:207: _Warning: Package 'multi_bible_search.data' is absent from the packages configuration. !!

          ********************************************************************************
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'multi_bible_search.data' as an importable package[^1],
          but it is absent from setuptools' `packages` configuration.

          This leads to an ambiguous overall configuration. If you want to distribute this
          package, please make sure that 'multi_bible_search.data' is explicitly added
          to the `packages` configuration field.

          Alternatively, you can also rely on setuptools' discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).

          You can read more about "package discovery" on setuptools documentation page:

          - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

          If you don't want 'multi_bible_search.data' to be distributed and are
          already explicitly excluding 'multi_bible_search.data' via
          `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
          you can try to use `exclude_package_data`, or `include-package-data=False` in
          combination with a more fine grained `package-data` configuration.

          You can read more about "package data files" on setuptools documentation page:

          - https://setuptools.pypa.io/en/latest/userguide/datafiles.html

          [^1]: For Python, any directory (with suitable naming) can be imported,
                even if it does not contain any `.py` files.
                On the other hand, currently there is no concept of package data
                directory, all directories are treated like packages.
          ********************************************************************************

  !!
    check.warn(importable)
  copying src\ctranslate\ctranslate.c -> build\lib.win-amd64-cpython-312\ctranslate
  creating build\lib.win-amd64-cpython-312\multi_bible_search\data
  copying src\multi_bible_search\data\ACV.json.pbz2 -> build\lib.win-amd64-cpython-312\multi_bible_search\data
  copying src\multi_bible_search\data\AKJV.json.pbz2 -> build\lib.win-amd64-cpython-312\multi_bible_search\data
  copying src\multi_bible_search\data\AMP.json.pbz2 -> build\lib.win-amd64-cpython-312\multi_bible_search\data
  copying src\multi_bible_search\data\ASV.json.pbz2 -> build\lib.win-amd64-cpython-312\multi_bible_search\data
  copying src\multi_bible_search\data\All.json.pbz2 -> build\lib.win-amd64-cpython-312\multi_bible_search\data
  copying src\multi_bible_search\data\BBE.json.pbz2 -> build\lib.win-amd64-cpython-312\multi_bible_search\data
  copying src\multi_bible_search\data\BSB.json.pbz2 -> build\lib.win-amd64-cpython-312\multi_bible_search\data
  copying src\multi_bible_search\data\CSB.json.pbz2 -> build\lib.win-amd64-cpython-312\multi_bible_search\data
  copying src\multi_bible_search\data\DRA.json.pbz2 -> build\lib.win-amd64-cpython-312\multi_bible_search\data
  copying src\multi_bible_search\data\Darby.json.pbz2 -> build\lib.win-amd64-cpython-312\multi_bible_search\data
  copying src\multi_bible_search\data\EBR.json.pbz2 -> build\lib.win-amd64-cpython-312\multi_bible_search\data
  copying src\multi_bible_search\data\ESV.json.pbz2 -> build\lib.win-amd64-cpython-312\multi_bible_search\data
  copying src\multi_bible_search\data\GNV.json.pbz2 -> build\lib.win-amd64-cpython-312\multi_bible_search\data
  copying src\multi_bible_search\data\KJV 1611.json.pbz2 -> build\lib.win-amd64-cpython-312\multi_bible_search\data
  copying src\multi_bible_search\data\KJV-like.json.pbz2 -> build\lib.win-amd64-cpython-312\multi_bible_search\data
  copying src\multi_bible_search\data\KJV.json.pbz2 -> build\lib.win-amd64-cpython-312\multi_bible_search\data
  copying src\multi_bible_search\data\LSV.json.pbz2 -> build\lib.win-amd64-cpython-312\multi_bible_search\data
  copying src\multi_bible_search\data\MSG.json.pbz2 -> build\lib.win-amd64-cpython-312\multi_bible_search\data
  copying src\multi_bible_search\data\NASB 1995.json.pbz2 -> build\lib.win-amd64-cpython-312\multi_bible_search\data
  copying src\multi_bible_search\data\NET.json.pbz2 -> build\lib.win-amd64-cpython-312\multi_bible_search\data
  copying src\multi_bible_search\data\NIV 1984.json.pbz2 -> build\lib.win-amd64-cpython-312\multi_bible_search\data
  copying src\multi_bible_search\data\NIV 2011.json.pbz2 -> build\lib.win-amd64-cpython-312\multi_bible_search\data
  copying src\multi_bible_search\data\NKJV.json.pbz2 -> build\lib.win-amd64-cpython-312\multi_bible_search\data
  copying src\multi_bible_search\data\NLT.json.pbz2 -> build\lib.win-amd64-cpython-312\multi_bible_search\data
  copying src\multi_bible_search\data\RNKJV.json.pbz2 -> build\lib.win-amd64-cpython-312\multi_bible_search\data
  copying src\multi_bible_search\data\RSV.json.pbz2 -> build\lib.win-amd64-cpython-312\multi_bible_search\data
  copying src\multi_bible_search\data\RWV.json.pbz2 -> build\lib.win-amd64-cpython-312\multi_bible_search\data
  copying src\multi_bible_search\data\UKJV.json.pbz2 -> build\lib.win-amd64-cpython-312\multi_bible_search\data
  copying src\multi_bible_search\data\WEB.json.pbz2 -> build\lib.win-amd64-cpython-312\multi_bible_search\data
  copying src\multi_bible_search\data\YLT.json.pbz2 -> build\lib.win-amd64-cpython-312\multi_bible_search\data
  running build_ext
  building 'ctranslate.ctranslate' extension
  error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for multi_bible_search Failed to build multi_bible_search ERROR: Could not build wheels for multi_bible_search, which is required to install pyproject.toml-based projects

C:\Users\shawn\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip>

samhaswon commented 7 months ago

Hopefully, 5434c61 should have built a relevant wheel (PyPi version >=1.0.1) for your platform among others. If that doesn't fix it, you will need to install a C compiler like is suggested in the line:

Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

If you end up using this package in an Alpine Docker container, the build stage here contains the required build tools. It also installs some other packages for building other dependencies of that particular project.