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

Install process on Pi and Beagleboard #7108

Closed
hughsheehy opened this issue Nov 27, 2022 · 4 comments
Closed

Install process on Pi and Beagleboard #7108

hughsheehy opened this issue Nov 27, 2022 · 4 comments
Labels
kind/question User questions (candidates for conversion to discussion)

Comments

@hughsheehy
Copy link

hughsheehy commented Nov 27, 2022

  • Poetry version: <1.2.2>
  • Python version: <3.7.3>
  • OS version and name: <Linux-4.19.94-ti-r42-armv7l-with-debian-10.13>
  • pyproject.toml: <haven't touched this...just trying to install Poetry in the first place>
  • [ 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 (-vvv option) and have included the output below.

Issue

I've successfully installed Poetry on various "normal" linux machines. But installing it on Pi and Beagle is either a long drawn out process of fixing dependencies or just not getting it to work at all (so far).

On Pi, the solution (or at least as much of it as I have notes for) is here. SwitchEV/iso15118#156 That finally worked.

I'm working on the beagle bone black now. And have been. From a totally fresh install of Debian 10, first, I get errors that rust isn't installed. Then I get errors that the version of rust isn't enough. Or at least that's what I think the log files are telling me. Then I install the correct version of Rust, I get a very long run time and then errors around pip and wheels....if it doesn't just stop.

So I'm stuck.
I have the log files, but they're long so I've pasted the first one here below.

H

### +++++++++++++++++++++++++Log1+++++++++++++++++++++++++++++++
Log 1

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting poetry==1.2.2
Downloading https://www.piwheels.org/simple/poetry/poetry-1.2.2-py3-none-any.whl (212 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 212.4/212.4 kB 514.3 kB/s eta 0:00:00
Collecting cleo<2.0.0,>=1.0.0a5
Downloading https://www.piwheels.org/simple/cleo/cleo-1.0.0a5-py3-none-any.whl (78 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.7/78.7 kB 156.9 kB/s eta 0:00:00
Collecting packaging>=20.4
Downloading https://www.piwheels.org/simple/packaging/packaging-21.3-py3-none-any.whl (40 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 40.8/40.8 kB 487.7 kB/s eta 0:00:00
Collecting tomlkit!=0.11.2,!=0.11.3,<1.0.0,>=0.11.1
Downloading https://www.piwheels.org/simple/tomlkit/tomlkit-0.11.6-py3-none-any.whl (35 kB)
Collecting cachecontrol[filecache]<0.13.0,>=0.12.9
Downloading https://www.piwheels.org/simple/cachecontrol/CacheControl-0.12.11-py2.py3-none-any.whl (21 kB)
Collecting virtualenv!=20.4.5,!=20.4.6,>=20.4.3
Downloading https://www.piwheels.org/simple/virtualenv/virtualenv-20.16.7-py3-none-any.whl (8.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.8/8.8 MB 1.9 MB/s eta 0:00:00
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.8/8.8 MB 1.9 MB/s eta 0:00:00
Collecting pexpect<5.0.0,>=4.7.0
Downloading https://www.piwheels.org/simple/pexpect/pexpect-4.8.0-py2.py3-none-any.whl (59 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 59.0/59.0 kB 664.8 kB/s eta 0:00:00
Collecting crashtest<0.4.0,>=0.3.0
Downloading https://www.piwheels.org/simple/crashtest/crashtest-0.3.1-py3-none-any.whl (7.0 kB)
Collecting dulwich<0.21.0,>=0.20.46
Downloading https://www.piwheels.org/simple/dulwich/dulwich-0.20.50-cp37-cp37m-linux_armv7l.whl (497 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 497.8/497.8 kB 742.5 kB/s eta 0:00:00
Collecting shellingham<2.0,>=1.5
Downloading https://www.piwheels.org/simple/shellingham/shellingham-1.5.0-py2.py3-none-any.whl (9.3 kB)
Collecting html5lib<2.0,>=1.0
Downloading https://www.piwheels.org/simple/html5lib/html5lib-1.1-py2.py3-none-any.whl (117 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 117.4/117.4 kB 285.4 kB/s eta 0:00:00
Collecting backports.cached-property<2.0.0,>=1.0.2
Downloading https://www.piwheels.org/simple/backports-cached-property/backports.cached_property-1.0.2-py3-none-any.whl (6.1 kB)
Collecting jsonschema<5.0.0,>=4.10.0
Downloading https://www.piwheels.org/simple/jsonschema/jsonschema-4.17.1-py3-none-any.whl (90 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 90.2/90.2 kB 377.6 kB/s eta 0:00:00
Collecting poetry-plugin-export<2.0.0,>=1.1.2
Downloading https://www.piwheels.org/simple/poetry-plugin-export/poetry_plugin_export-1.2.0-py3-none-any.whl (10 kB)

then there's a lot more of the same....and then

Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Collecting more-itertools
Downloading https://www.piwheels.org/simple/more-itertools/more_itertools-9.0.0-py3-none-any.whl (52 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 52.8/52.8 kB 776.4 kB/s eta 0:00:00
Collecting cffi>=1.12
Using cached https://www.piwheels.org/simple/cffi/cffi-1.15.1-cp37-cp37m-linux_armv7l.whl (219 kB)
Collecting pycparser
Using cached https://www.piwheels.org/simple/pycparser/pycparser-2.21-py2.py3-none-any.whl (119 kB)
Building wheels for collected packages: cryptography
Building wheel for cryptography (pyproject.toml): started
Building wheel for cryptography (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error

× Building wheel for cryptography (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [193 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-armv7l-cpython-37
creating build/lib.linux-armv7l-cpython-37/cryptography
copying src/cryptography/utils.py -> build/lib.linux-armv7l-cpython-37/cryptography
copying src/cryptography/exceptions.py -> build/lib.linux-armv7l-cpython-37/cryptography
copying src/cryptography/init.py -> build/lib.linux-armv7l-cpython-37/cryptography
copying src/cryptography/about.py -> build/lib.linux-armv7l-cpython-37/cryptography
copying src/cryptography/fernet.py -> build/lib.linux-armv7l-cpython-37/cryptography
creating build/lib.linux-armv7l-cpython-37/cryptography/x509
copying src/cryptography/x509/base.py -> build/lib.linux-armv7l-cpython-37/cryptography/x509
copying src/cryptography/x509/general_name.py -> build/lib.linux-armv7l-cpython-37/cryptography/x509
copying src/cryptography/x509/extensions.py -> build/lib.linux-armv7l-cpython-37/cryptography/x509
copying src/cryptography/x509/ocsp.py -> build/lib.linux-armv7l-cpython-37/cryptography/x509
copying src/cryptography/x509/init.py -> build/lib.linux-armv7l-cpython-37/cryptography/x509
copying src/cryptography/x509/certificate_transparency.py -> build/lib.linux-armv7l-cpython-37/cryptography/x509
copying src/cryptography/x509/name.py -> build/lib.linux-armv7l-cpython-37/cryptography/x509
copying src/cryptography/x509/oid.py -> build/lib.linux-armv7l-cpython-37/cryptography/x509
creating build/lib.linux-armv7l-cpython-37/cryptography/hazmat
copying src/cryptography/hazmat/_oid.py -> build/lib.linux-armv7l-cpython-37/cryptography/hazmat
copying src/cryptography/hazmat/init.py -> build/lib.linux-armv7l-cpython-37/cryptography/hazmat
creating build/lib.linux-armv7l-cpython-37/cryptography/hazmat/bindings
copying src/cryptography/hazmat/bindings/init.py -> build/lib.linux-armv7l-cpython-37/cryptography/hazmat/bindings
creating build/lib.linux-armv7l-cpython-37/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/hashes.py -> build/lib.linux-armv7l-cpython-37/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/constant_time.py -> build/lib.linux-armv7l-cpython-37/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/poly1305.py -> build/lib.linux-armv7l-cpython-37/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/keywrap.py -> build/lib.linux-armv7l-cpython-37/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/hmac.py -> build/lib.linux-armv7l-cpython-37/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/cmac.py -> build/lib.linux-armv7l-cpython-37/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/init.py -> build/lib.linux-armv7l-cpython-37/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/_serialization.py -> build/lib.linux-armv7l-cpython-37/cryptography/hazmat/primitives

then a lot more of that....and then
running egg_info
writing src/cryptography.egg-info/PKG-INFO
writing dependency_links to src/cryptography.egg-info/dependency_links.txt
writing requirements to src/cryptography.egg-info/requires.txt
writing top-level names to src/cryptography.egg-info/top_level.txt
reading manifest file 'src/cryptography.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/_build'
warning: no previously-included files found matching 'vectors'
warning: no previously-included files matching '' found under directory 'vectors'
warning: no previously-included files matching '
' found under directory '.github'
warning: no previously-included files found matching 'release.py'
warning: no previously-included files found matching '.readthedocs.yml'
warning: no previously-included files found matching 'dev-requirements.txt'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files found matching 'mypy.ini'
warning: no previously-included files matching '*' found under directory '.circleci'
adding license file 'LICENSE'
adding license file 'LICENSE.APACHE'
adding license file 'LICENSE.BSD'
adding license file 'LICENSE.PSF'
writing manifest file 'src/cryptography.egg-info/SOURCES.txt'
copying src/cryptography/py.typed -> build/lib.linux-armv7l-cpython-37/cryptography
copying src/cryptography/hazmat/bindings/_openssl.pyi -> build/lib.linux-armv7l-cpython-37/cryptography/hazmat/bindings

 creating build/lib.linux-armv7l-cpython-37/cryptography/hazmat/bindings/_rust
  copying src/cryptography/hazmat/bindings/_rust/__init__.pyi -> build/lib.linux-armv7l-cpython-37/cryptography/hazmat/bindings/_rust
  copying src/cryptography/hazmat/bindings/_rust/asn1.pyi -> build/lib.linux-armv7l-cpython-37/cryptography/hazmat/bindings/_rust
  copying src/cryptography/hazmat/bindings/_rust/ocsp.pyi -> build/lib.linux-armv7l-cpython-37/cryptography/hazmat/bindings/_rust
  copying src/cryptography/hazmat/bindings/_rust/x509.pyi -> build/lib.linux-armv7l-cpython-37/cryptography/hazmat/bindings/_rust
  running build_ext
  generating cffi module 'build/temp.linux-armv7l-cpython-37/cryptography.hazmat.bindings._openssl.c'
  creating build/temp.linux-armv7l-cpython-37
  running build_rust
  /tmp/pip-build-env-zjjeo_3b/overlay/lib/python3.7/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning:
 /tmp/pip-build-env-zjjeo_3b/overlay/lib/python3.7/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning:     Ins$
      !!


      ############################
      # Package would be ignored #
      ############################
      Python recognizes 'cryptography.hazmat.bindings._rust' as an importable package,
      but it is not listed in the `packages` configuration of setuptools.

      'cryptography.hazmat.bindings._rust' has been automatically added to the distribution only
      because it may contain data files, but this behavior is likely to change
      in future versions of setuptools (and therefore is considered deprecated).

      Please make sure that 'cryptography.hazmat.bindings._rust' is included as a package by using
      the `packages` configuration field or the proper discovery methods
      (for example by using `find_namespace_packages(...)`/`find_namespace:`
      instead of `find_packages(...)`/`find:`).

      You can read more about "package discovery" and "data files" on setuptools
      documentation page.

  !!

    check.warn(importable)

      =============================DEBUG ASSISTANCE=============================
      If you are seeing a compilation error please try the following steps to
      successfully install cryptography:
      1) Upgrade to the latest pip and try again. This will fix errors for most
         users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
      2) Read https://cryptography.io/en/latest/installation/ for specific
         instructions for your platform.
      3) Check our frequently asked questions for more information:
         https://cryptography.io/en/latest/faq/
      4) Ensure you have a recent Rust toolchain installed:
         https://cryptography.io/en/latest/installation/#rust

      Python: 3.7.3
      platform: Linux-4.19.94-ti-r42-armv7l-with-debian-10.13

    pip: n/a
      setuptools: 65.6.3
      setuptools_rust: 1.5.2
      rustc: n/a
      =============================DEBUG ASSISTANCE=============================

  error: can't find Rust compiler

If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install fr$

  To update pip, run:

      pip install --upgrade pip

  and then retry package installation.

  If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on $

  This package requires Rust >=1.48.0.
  [end of output]
@hughsheehy hughsheehy added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Nov 27, 2022
@hughsheehy hughsheehy changed the title Install process leads to error after error on pi and Beagleboard Install process on Pi and Beagleboard Nov 27, 2022
@dimbleby
Copy link
Contributor

This is nothing much to do with poetry - you are having trouble installing the cryptography package (which appears in poetry's dependency tree)

As the error message says, either

  • there is no cryptography wheel available for your platform - in which case you will have to set up all the necessary dependencies (in particular a rust compiler) to build from source. Maybe https://cryptography.io/en/38.0.4/installation/ has some pointers.
  • or installing a newer version of pip might allow you to find a wheel that an earlier version of pip did not recognise

There's nothing that can be done from this project to help you with any of that.

(Except possibly losing the cryptography dependency... that appears as an indirect dependency via keyring. Personally I wouldn't mind in the least if poetry lost keyring functionality - but I don't think it's likely to happen, and I don't think that this issue would be a good reason for taking that decision)

@neersighted
Copy link
Member

Indeed, this is not a Poetry issue. You can try to force the install to use a binary version of Cryptography through e.g. pip install --extra-index-url <piwheels> --only-binary cryptography poetry in a virtual environment as suggested in our advanced installation instructions.

@neersighted neersighted added kind/question User questions (candidates for conversion to discussion) and removed kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Nov 28, 2022
@hughsheehy
Copy link
Author

Fair points all.

I did finally get the Cryptography install to work. Lots of installing additional dependencies, updated versions, etc. (virtual env, pip, pipx, etc). And then the install takes more than an hour on a Beagle Bone Black. Small CPU.

At least if someone has the same issue they'll at least find that it's possible!

H

Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/question User questions (candidates for conversion to discussion)
Projects
None yet
Development

No branches or pull requests

3 participants