Skip to content

Instantly share code, notes, and snippets.

View misterEggroll's full-sized avatar

Aditya misterEggroll

View GitHub Profile
@misterEggroll
misterEggroll / turicreate_install.md
Last active July 2, 2023 10:57
Installing `turicreate` on my M1 Mac

Why

I needed to install turecreate[ref] for a course I was doing on Coursera. At the onset, I didn't imagine I'd spend so much time setting up my laptop for this. Makes sense to capture the hoops you need to jump to get something to work on an M1 which is built for x86 architecture.

turecreate is built for the intel chipset version of Mac OS. Newer macs(M1,M2) are built using arm64 architecture. You need to use the rosetta translation process to run such libraries.

How

@misterEggroll
misterEggroll / psycopg2_troubleshooting.md
Created June 20, 2023 06:27
Install psycopg2 on M1 Mac

The Problem

This is what I encounter when installing psycopg2 on my M1 Mac.

      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include "-DPSYCOPG_VERSION=2.9.6 (dt dec pq3 ext lo64)" -DPSYCOPG_DEBUG=1 -DPG_VERSION_NUM=150003 -DHAVE_LO64=1 -DPSYCOPG_DEBUG=1 -I/Users/<user>/.pyenv/versions/iproxy/include -I/Users/<user>/.pyenv/versions/3.10.11/include/python3.10 -I. -I/opt/homebrew/opt/libpq/include -I/opt/homebrew/opt/libpq/include/postgresql/server -c psycopg/win32_support.c -o build/temp.macosx-13.4-arm64-cpython-310/psycopg/win32_support.o
      In file included from psycopg/win32_support.c:28:
      In file included from ./psycopg/psycopg.h:38:
      ./psycopg/config.h:69:13: warning: unused function 'Dprintf' [-Wunused-function]
      static void Dprintf(const char *fmt, ...)