python-poetry / poetry

Python packaging and dependency management made easy
https://python-poetry.org
MIT License
31.08k stars 2.26k forks source link

Packages won't install in project virtual env on Raspberry Pi #6579

Closed foarev closed 1 year ago

foarev commented 1 year ago

Issue

I'm trying to set up my usual virtual environment on a Raspberry Pi, but when running poetry install, the packages aren't installed at all in the project's .venv folder. My poetry.lock file is generated correctly and finds targets for all my libraries, it's just the installation that fails, without giving me any error message.

$ poetry install -vvv
Loading configuration file /home/pi/.config/pypoetry/config.toml
Using virtualenv: /home/pi/Documents/project_name/.venv
Project environment contains an empty path in sys_path, ignoring.
Installing dependencies from lock file

Finding the necessary packages for the current system

Package operations: 2 installs, 0 updates, 0 removals

When doing poetry show, I can see the packages I'm trying to install, but they show up in red because they're not in the venv folder. For simplicity I only kept 2 packages here, but I have this issue with all my packages.

$ poetry show
pyvisa            1.12.0 Python VISA bindings for GPIB, RS232, TCPIP and US...
typing-extensions 4.3.0  Backported and Experimental Type Hints for Python ...

Here's my poetry configuration:

$ poetry config --list
cache-dir = "/home/pi/.cache/pypoetry"
experimental.new-installer = true
experimental.system-git-client = false
installer.max-workers = null
installer.no-binary = null
installer.parallel = true
virtualenvs.create = true
virtualenvs.in-project = true
virtualenvs.options.always-copy = false
virtualenvs.options.no-pip = false
virtualenvs.options.no-setuptools = false
virtualenvs.options.system-site-packages = false
virtualenvs.path = "{cache-dir}/virtualenvs"  # /home/pi/.cache/pypoetry/virtualenvs
virtualenvs.prefer-active-python = false
virtualenvs.prompt = "{project_name}-py{python_version}"

I'm not sure if this is an issue with the architecture, or if there's anything missing in my environment, but I've tried lots of different things to fix this issue and none of them worked: reinstalling poetry, downgrading it to an earlier version, reinstalling virtualenv etc. Keep in mind that this is the same exact set up as the one I use on Windows, which works totally fine. The packages I'm using here aren't windows only either, and I've managed to install them on this machine using pip or pipenv.

dimbleby commented 1 year ago

This is of course unsatisfactory, but unless you luck out and someone recognises this - I think the only person who can debug this is likely to be you. No output doesn't give anyone anything to work with.

If I were hitting this I'd likely add some print("here we are") or even assert False to the code, to figure out how far things are getting. The output you do have says you are getting as far as this, after that you should go through _execute_operation() to _execute_install()...

finswimmer commented 1 year ago

Hello @foarev,

you haven't come back to this issue for a long while. So I assume this is solved in the meantime and I can close this ticket.

Feel free to leave a comment if you disagree.

fin swimmer

jylind commented 1 year ago

I'm suffering this exact same problem. I'm using Pi 3B version .venv is created and it contains runnable Python but none of the packages nor the root project.

I can create requirements.txt from my pyproject file and install dependencies with command:

poetry run pip -U -r requirements.txt

Though I won't get root project installed (needed to create .pth file manually)

once completed I can run poetry scripts with poetry like this

poetry run invoke ...
github-actions[bot] commented 6 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.