Installing NetBox psycopg2 on ARM64 macOS #6791

Closed
opened 2025-12-29 19:45:26 +01:00 by adam · 2 comments
Owner

Originally created by @basictheprogram on GitHub (Aug 9, 2022).

Change Type

Addition

Area

Installation instructions

Proposed Changes

The psycopg2-binary python package fails to install on macOS 12.5 on ARM64 aka Apple Silicon aka M1 processor

$ sw_vers
ProductName:	macOS
ProductVersion:	12.5
BuildVersion:	21G72
(netbox) $ python -m pip install -r requirements.txt
Collecting psycopg2-binary
  Using cached psycopg2-binary-2.9.3.tar.gz (380 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1

Proposed work-around.

$ pip install -i https://test.pypi.org/simple/ psycopg2-binary==2.9.3
(netbox) $ python -m pip install -r requirements.txt

https://test.pypi.org is a separate instance of the Python Package Index that allows you to try distribution tools and processes without affecting the real index.

Originally created by @basictheprogram on GitHub (Aug 9, 2022). ### Change Type Addition ### Area Installation instructions ### Proposed Changes The psycopg2-binary python package fails to install on macOS 12.5 on ARM64 aka Apple Silicon aka M1 processor ``` $ sw_vers ProductName: macOS ProductVersion: 12.5 BuildVersion: 21G72 ``` ``` (netbox) $ python -m pip install -r requirements.txt Collecting psycopg2-binary Using cached psycopg2-binary-2.9.3.tar.gz (380 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ``` Proposed work-around. ``` $ pip install -i https://test.pypi.org/simple/ psycopg2-binary==2.9.3 (netbox) $ python -m pip install -r requirements.txt ``` https://test.pypi.org is a separate instance of the Python Package Index that allows you to try distribution tools and processes without affecting the real index.
adam added the type: documentation label 2025-12-29 19:45:26 +01:00
adam closed this issue 2025-12-29 19:45:26 +01:00
Author
Owner

@jeremystretch commented on GitHub (Aug 9, 2022):

The official documentation does not address installation on macOS. Additionally, this seems like something you should raise with the package's maintainers.

@jeremystretch commented on GitHub (Aug 9, 2022): The official documentation does not address installation on macOS. Additionally, this seems like something you should raise with the package's maintainers.
Author
Owner

@basictheprogram commented on GitHub (Aug 9, 2022):

Just trying to make it easier for potential NetBox developers on macOS to setup a development environment.

Splitting hairs, but it's not really an installation, for production, documentation change. It's creation of a NetBox development environment on arm64 macOS.

There are many (many) posts, threads, requests to the package maintainers to get a psycopg2-binary wheel for arm64 macOS.

Issue is here for other arm64 macOS developers to find when they stumble upon the problem.

@basictheprogram commented on GitHub (Aug 9, 2022): Just trying to make it easier for potential NetBox developers on macOS to setup a development environment. Splitting hairs, but it's not really an installation, for production, documentation change. It's creation of a NetBox development environment on arm64 macOS. There are many (many) posts, threads, requests to the package maintainers to get a psycopg2-binary wheel for arm64 macOS. Issue is here for other arm64 macOS developers to find when they stumble upon the problem.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6791