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

poetry Unable to find installation candidates for pysqlite3-binary #67

Closed
franziskavonalbedyll opened this issue Oct 8, 2023 · 4 comments

Comments

@franziskavonalbedyll
Copy link

Hi there!
Hope this is the right place to ask, otherwise I will move this to the poetry community.

  • Poetry version: 1.6.1
  • Python version: Python 3.11.4
  • OS version and name: Mac OS Ventura 13.0
    pyproject.toml:
[tool.poetry]
name = "chatwithmycv"
version = "0.1.0"
description = "Build a simple chatbot which answers questions about your CV"
authors = <author>
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.11"
openai = "^0.28.1"
langchain = "^0.0.308"
python-dotenv = "^1.0.0"
chromadb = "^0.4.13"
tiktoken = "^0.5.1"
streamlit = "^1.27.2"
streamlit-chat = "^0.1.1"
azure-storage-blob = "^12.18.2"

[tool.poetry.group.dev.dependencies]
pre-commit = "^3.4.0"
pydocstyle = "^6.3.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

Issue

I am trying to install the pysqlite3-binary using the following command:

 poetry add pysqlite3-binary 

Which returns the following exception:

Configuration file exists at /Users/fva/Library/Preferences/pypoetry, reusing this directory.

Consider moving TOML configuration files to /Users/fva/Library/Application Support/pypoetry, as support for the legacy directory will be removed in an upcoming release.
Using version ^0.5.2.post1 for pysqlite3-binary

Updating dependencies
Resolving dependencies... (0.8s)

Package operations: 1 install, 0 updates, 0 removals

  • Installing pysqlite3-binary (0.5.2.post1): Failed

  RuntimeError

  Unable to find installation candidates for pysqlite3-binary (0.5.2.post1)

  at /opt/homebrew/Cellar/poetry/1.5.1/libexec/lib/python3.11/site-packages/poetry/installation/chooser.py:73 in choose_for
       69│ 
       70│             links.append(link)
       71│ 
       72│         if not links:
    →  73│             raise RuntimeError(f"Unable to find installation candidates for {package}")
       74│ 
       75│         # Get the best link
       76│         chosen = max(links, key=lambda link: self._sort_key(package, link))

I tried the following to solve this issue:

  • Verified on pypi.org that the version 0.5.2.post1 exist
  • Connected to a different network
  • Tried with and without VPN
  • Updated poetry
  • Tried several older versions
  • Re-installed poetry
  • Set poetry config repositories.pypi.url https://pypi.org/simple/

None of these approaches worked.

@coleifer
Copy link
Owner

coleifer commented Oct 8, 2023

Yeah we don't publish wheels for macos, you'll want to compile it yourself by swapping pysqlite3-binary for pysqlite3. Just ensure you have the sqlite3 headers and you should be set.

@coleifer coleifer closed this as completed Oct 8, 2023
@franziskavonalbedyll
Copy link
Author

Thanks for your quick answer

Yeah we don't publish wheels for macos, you'll want to compile it yourself by swapping pysqlite3-binary for pysqlite3. Just ensure you have the sqlite3 headers and you should be set.

I ran brew install sqlite3and then poetry add pysqlite3, which throws me another exception:

Updating dependencies
Resolving dependencies... Downloading https://files.pythonhosted.org/packages/de/c2/34341d97acec471e26964811230209f3e604fdcd68587f314607ff1a2753/pysqlite3-0.5.1.tar.gz (0.6Resolving dependencies... (5.7s)

Package operations: 1 install, 0 updates, 0 removals

  • Installing pysqlite3 (0.5.1): Failed

  TypeError

  Can't instantiate abstract class IsolatedEnv with abstract methods make_extra_environ, python_executable

  at /opt/homebrew/Cellar/poetry/1.6.1_1/libexec/lib/python3.11/site-packages/poetry/installation/chef.py:109 in _prepare
      105│     ) -> Path:
      106│         from subprocess import CalledProcessError
      107│ 
      108│         with ephemeral_environment(self._env.python) as venv:
    → 109│             env = IsolatedEnv(venv, self._pool)
      110│             builder = ProjectBuilder(
      111│                 directory,
      112│                 python_executable=env.executable,
      113│                 scripts_dir=env.scripts_dir,

Did I misunderstand what you want me to do?

@coleifer
Copy link
Owner

coleifer commented Oct 8, 2023

That appears to be a bug in “poetry”. I suggest asking them or just use pip.

@franziskavonalbedyll
Copy link
Author

That appears to be a bug in “poetry”. I suggest asking them or just use pip.

I will report to them, thank you for your help.

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