Packages won't install in project virtual env on Raspberry Pi
- Poetry version: 1.2.1
- Python version: 3.9.2
- OS version and name: Raspbian on a Raspberry Pi 4 (armv7l architecture)
- pyproject.toml: https://gist.github.com/foarev/62c82053460d333fda3068532790c68c
- [x] I am on the latest stable Poetry version, installed using a recommended method.
- [x] I have searched the issues of this repo and believe that this is not a duplicate.
- [x] I have consulted the FAQ and blog for any relevant entries or release notes.
- [x] If an exception occurs when executing a command, I executed it again in debug mode (
-vvvoption) and have included the output below.
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.
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()...
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
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 ...
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.