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

Packages not finding libraries #10265

Open
MrSampson opened this issue Mar 8, 2025 · 2 comments
Open

Packages not finding libraries #10265

MrSampson opened this issue Mar 8, 2025 · 2 comments
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged

Comments

@MrSampson
Copy link

Description

I really don't know how to describe what's going on, but libraries in the site-packages folder are not being found when using poetry 2.1

Using a new folder:
poetry add torch transformers ipython -- assuming the pyproject.toml points to the correct directory for Pytorch

Using ipython:

from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("distilbert/distilbert-base-uncased")

results in the following error:
ImportError: libcudnn.so.9: cannot open shared object file: No such file or directory

but the file is definitely in .venv/lib/python3.13/site-packages/nvidia/cudnn/lib/libcudnn.so.9.

Whereas if I use the equivalent commands with pip in a different new folder

source .venv/bin/activate
pip install torch  --index-url https://download.pytorch.org/whl/cu126
pip install transformers ipython

and execute the Tokenizer commands in ipython, all is well.

What could be going on here?

Workarounds

I've switched to pip.

Poetry Installation Method

pipx

Operating System

Fedora 41

Poetry Version

Poetry (version 2.1.0)

Poetry Configuration

cache-dir = "/home/<removed>/.cache/pypoetry"
data-dir = "/home/<removed>/.local/share/pypoetry"
installer.max-workers = null
installer.no-binary = null
installer.only-binary = null
installer.parallel = true
installer.re-resolve = true
keyring.enabled = true
python.installation-dir = "{data-dir}/python"  # /home/<removed>/.local/share/pypoetry/python
repositories.torch.url = "https://download.pytorch.org/whl/cu126"
requests.max-retries = 0
solver.lazy-wheel = true
system-git-client = false
virtualenvs.create = true
virtualenvs.in-project = true
virtualenvs.options.always-copy = false
virtualenvs.options.no-pip = false
virtualenvs.options.system-site-packages = false
virtualenvs.path = "{cache-dir}/virtualenvs"  # /home/<removed>/.cache/pypoetry/virtualenvs
virtualenvs.prompt = "{project_name}-py{python_version}"
virtualenvs.use-poetry-python = false

Python Sysconfig

sysconfig.log
Paste the output of 'python -m sysconfig', over this line.

Example pyproject.toml

Poetry Runtime Logs

poetry-runtime.log
Paste the output of 'poetry -vvv <command>', over this line.
@MrSampson MrSampson added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Mar 8, 2025
@dimbleby
Copy link
Contributor

dimbleby commented Mar 8, 2025

duplicate #9635, #9291

no reason to think there is a poetry bug here - but the reporters do not seem to have explained what, if anything, they understood.

If and when you figure it out, do leave an update for the next person.

@MrSampson
Copy link
Author

Sorry about the duplicate. I guess my Google Fu wasn't up for the task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants