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

Problem installing napalm on OpenBSD 7.3 #1912

Open
1 task done
quistian opened this issue May 3, 2023 · 5 comments
Open
1 task done

Problem installing napalm on OpenBSD 7.3 #1912

quistian opened this issue May 3, 2023 · 5 comments

Comments

@quistian
Copy link

quistian commented May 3, 2023

Description of Issue/Question

Note: Please check https://guides.github.com/features/mastering-markdown/
to see how to properly format your request.

Did you follow the steps from https://github.com/napalm-automation/napalm#faq

(Place an x between the square brackets where applicable)

  • Yes
  • [] No

Setup

napalm version

(Paste verbatim output from pip freeze | grep napalm between quotes below)


Network operating system version

(Paste verbatim output from show version - or equivalent - between quotes below)

OpenBSD 7.3

Steps to Reproduce the Issue

pip install napalm

Error Traceback

(Paste the complete traceback of the exception between quotes below)

Collecting pynacl>=1.5 (from paramiko>=2.6.0->napalm)
  Using cached PyNaCl-1.5.0-cp310-cp310-openbsd_7_3_amd64.whl
Requirement already satisfied: charset-normalizer<4,>=2 in ./aos-napalm-env/lib/python3.10/site-packages (from requests>=2.7.0->napalm) (3.1.0)
Requirement already satisfied: idna<4,>=2.5 in ./aos-napalm-env/lib/python3.10/site-packages (from requests>=2.7.0->napalm) (3.4)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in ./aos-napalm-env/lib/python3.10/site-packages (from requests>=2.7.0->napalm) (1.26.15)
Requirement already satisfied: certifi>=2017.4.17 in ./aos-napalm-env/lib/python3.10/site-packages (from requests>=2.7.0->napalm) (2022.12.7)
Building wheels for collected packages: cryptography
  Building wheel for cryptography (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for cryptography (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [356 lines of output]
...
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 'ci-constraints-requirements.txt'
      warning: no previously-included files found matching 'mypy.ini'
      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'
      /tmp/pip-build-env-mq4qft85/overlay/lib/python3.10/site-packages/setuptools/command/build_py.py:201: _Warning: Package 'cryptography.hazmat.bindings._rust' is absent from the `packages` configuration.
      !!

@bewing
Copy link
Member

bewing commented May 3, 2023

If you install the wheel package first via pip, does pip install napalm succeed afterwards? Building cryptography from source requires quite the intensive build toolchain

@quistian
Copy link
Author

quistian commented May 3, 2023

I installed wheel first. Same problem:
Caused by: process didn't exit successfully:/tmp/pip-install-2h1ck8fi/cryptography_8435200d6ce0493680090b78312d94f3/src/rust/target/release/build/cryptography-rust-2d57360915c33af1/build-script-build` (exit status: 101)
--- stdout
cargo:rerun-if-changed=../_cffi_src/
cargo:rustc-cfg=python_implementation="CPython"

    --- stderr
    thread 'main' panicked at 'unable to find openssl include path', build.rs:52:49
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
  warning: build failed, waiting for other jobs to finish...

      =============================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.10.11
      platform: OpenBSD-7.3-amd64-64bit-ELF
      pip: n/a
      setuptools: 67.7.2
      setuptools_rust: 1.6.0
      rustc: 1.68.0 (2c8cc3432 2023-03-06) (built from a source tarball)
      =============================DEBUG ASSISTANCE=============================

  error: `cargo rustc --lib --message-format=json-render-diagnostics --manifest-path src/rust/Cargo.toml --release -v --features 'pyo3/abi3-py36 pyo3/extension-module' --crate-type cdylib --` failed with code 101
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for cryptography
Successfully built future
Failed to build cryptography
ERROR: Could not build wheels for cryptography, which is required to install pyproject.toml-based projects`

I note that OpenBSD has a python3 package:

py3-cryptography-39.0.1 cryptographic recipes and primitives for Python

Which is installed. I wonder if I uninstall this first.

@ktbyers
Copy link
Contributor

ktbyers commented May 8, 2023

Have you tried to just use the Cryptography version 39.0.1?

If it is already installed on your system, I would see if I could use that. I checked Paramiko and that should suffice. It is possible that something else requires a newer version of cryptography (but it probably really isn't needed i.e. 39.0.1 is probably new enough).

@quistian
Copy link
Author

The system has 39.0.1. How do I use that version, as the pip process seems to be asking for v40?

@ktbyers
Copy link
Contributor

ktbyers commented May 10, 2023

@quistian Have you looked through the PIP output to see what is requiring version 40?

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

3 participants