neuml/txtai

Unable to install with pipenv

Closed this issue · 5 comments

MacOS 15.2
pipenv installed via homebrew

pipenv --version
pipenv, version 2024.4.0
pipenv install txtai
Creating a virtualenv for this project
Pipfile: /Users/rich/Dropbox/code/txtai-messing/Pipfile
Using default python from /opt/homebrew/Cellar/pipenv/2024.4.0/libexec/bin/python3.13.1 to create virtualenv...
⠸ Creating virtual environment...created virtual environment CPython3.13.1.final.0-64 in 260ms
  creator CPython3macOsBrew(dest=/Users/rich/.local/share/virtualenvs/txtai-messing-2xcjMP0s, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, via=copy, app_data_dir=/Users/rich/Library/Application Support/virtualenv)
    added seed packages: pip==24.3.1
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator

⠼ Creating virtual environment...✔ Successfully created virtual environment!
Virtualenv location: /Users/rich/.local/share/virtualenvs/txtai-messing-2xcjMP0s
Creating a Pipfile for this project...
Pipfile.lock not found, creating...
Locking [packages] dependencies...
Locking [dev-packages] dependencies...
Updated Pipfile.lock (494d5b4f482f0ef471f49afe28f00ec1a2ff75da2ce65060d8cabaeb3da2f100)!
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
Installing txtai...
✔ Installation Succeeded
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
Installing dependencies from Pipfile.lock (a2f100)...
All dependencies are now up-to-date!
Upgrading txtai in  dependencies.
Building requirements...
Resolving dependencies...
✘ Locking Failed!
⠦ Locking packages...False
<console width=156 ColorSystem.TRUECOLOR>
Traceback (most recent call last):
  File "/opt/homebrew/bin/pipenv", line 8, in <module>
    sys.exit(cli())
             ~~~^^
  File "/opt/homebrew/Cellar/pipenv/2024.4.0/libexec/lib/python3.13/site-packages/pipenv/vendor/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/pipenv/2024.4.0/libexec/lib/python3.13/site-packages/pipenv/cli/options.py", line 52, in main
    return super().main(*args, **kwargs, windows_expand_args=False)
           ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/pipenv/2024.4.0/libexec/lib/python3.13/site-packages/pipenv/vendor/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/opt/homebrew/Cellar/pipenv/2024.4.0/libexec/lib/python3.13/site-packages/pipenv/vendor/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/opt/homebrew/Cellar/pipenv/2024.4.0/libexec/lib/python3.13/site-packages/pipenv/vendor/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/pipenv/2024.4.0/libexec/lib/python3.13/site-packages/pipenv/vendor/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/opt/homebrew/Cellar/pipenv/2024.4.0/libexec/lib/python3.13/site-packages/pipenv/vendor/click/decorators.py", line 92, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
           ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/pipenv/2024.4.0/libexec/lib/python3.13/site-packages/pipenv/vendor/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/opt/homebrew/Cellar/pipenv/2024.4.0/libexec/lib/python3.13/site-packages/pipenv/cli/command.py", line 207, in install
    do_install(
    ~~~~~~~~~~^
        state.project,
        ^^^^^^^^^^^^^^
    ...<14 lines>...
        skip_lock=state.installstate.skip_lock,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/opt/homebrew/Cellar/pipenv/2024.4.0/libexec/lib/python3.13/site-packages/pipenv/routines/install.py", line 310, in do_install
    new_packages, _ = handle_new_packages(
                      ~~~~~~~~~~~~~~~~~~~^
        project,
        ^^^^^^^^
    ...<9 lines>...
        index=index,
        ^^^^^^^^^^^^
    )
    ^
  File "/opt/homebrew/Cellar/pipenv/2024.4.0/libexec/lib/python3.13/site-packages/pipenv/routines/install.py", line 114, in handle_new_packages
    do_update(
    ~~~~~~~~~^
        project,
        ^^^^^^^^
    ...<7 lines>...
        categories=pipfile_categories,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/opt/homebrew/Cellar/pipenv/2024.4.0/libexec/lib/python3.13/site-packages/pipenv/routines/update.py", line 75, in do_update
    upgrade(
    ~~~~~~~^
        project,
        ^^^^^^^^
    ...<9 lines>...
        extra_pip_args=extra_pip_args,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/opt/homebrew/Cellar/pipenv/2024.4.0/libexec/lib/python3.13/site-packages/pipenv/routines/update.py", line 364, in upgrade
    upgrade_lock_data = venv_resolve_deps(
        requested_packages[pipfile_category],
    ...<6 lines>...
        pypi_mirror=pypi_mirror,
    )
  File "/opt/homebrew/Cellar/pipenv/2024.4.0/libexec/lib/python3.13/site-packages/pipenv/utils/resolver.py", line 907, in venv_resolve_deps
    c = resolve(cmd, st, project=project)
  File "/opt/homebrew/Cellar/pipenv/2024.4.0/libexec/lib/python3.13/site-packages/pipenv/utils/resolver.py", line 771, in resolve
    raise RuntimeError("Failed to lock Pipfile.lock!")
RuntimeError: Failed to lock Pipfile.lock!

Any suggestions? Other packages install fine, so don't think it's specific to my environment / I get the same issue on multiple machines.

Same issue if I install from source with pipenv install git+https://github.com/neuml/txtai

If I go into a pipenv shell I get a bit more of a clue:

pip install git+https://github.com/neuml/txtai
Collecting git+https://github.com/neuml/txtai
  Cloning https://github.com/neuml/txtai to /private/var/folders/h7/wck09vjj2gg76b9hk3xqhh9m0000gn/T/pip-req-build-hq38slf6
  Running command git clone --filter=blob:none --quiet https://github.com/neuml/txtai /private/var/folders/h7/wck09vjj2gg76b9hk3xqhh9m0000gn/T/pip-req-build-hq38slf6
  Resolved https://github.com/neuml/txtai to commit 34ffc9723deb013612f0d87e631fb53ee7881088
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting faiss-cpu>=1.7.1.post2 (from txtai==8.2.0)
  Downloading faiss_cpu-1.9.0.post1-cp313-cp313-macosx_11_0_arm64.whl.metadata (4.4 kB)
Collecting msgpack>=1.0.7 (from txtai==8.2.0)
  Downloading msgpack-1.1.0-cp313-cp313-macosx_11_0_arm64.whl.metadata (8.4 kB)
INFO: pip is looking at multiple versions of txtai to determine which version is compatible with other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement torch>=1.12.1 (from txtai) (from versions: none)
ERROR: No matching distribution found for torch>=1.12.1
python -V
Python 3.13.1

Made a new environment with
pipenv install --python 3.12 and can now install!

Thank you for coming to my TED Talk.

All good. Each issue filed likely helps someone else via a Google (or ChatGPT?) search in the future.

PyTorch on Python 3.13 is still a work in progress. For future reference to those who come across this: pytorch/pytorch#130249

True! And thanks for your work, this project is really interesting and has been great to use so far 😄

Thank you, feel free to tune back in with more as you explore.