Hello! I have set up meltano with poetry on Mac M1...
# troubleshooting
a
Hello! I have set up meltano with poetry on Mac M1. I am struggling with
target-redshift
, cannot install it (
tap-redshift
is working!). 🤡
Loader 'target-redshift' could not be installed: Failed to install plugin 'target-redshift'.
No result after removing/adding the plugin, deleting lock-file, etc. Looking into`.meltano/logs/pip/loaders/target-redshift/pip.log` , I found this:
*ERROR*: Could not build wheels for psycopg2-binary, which is required to install pyproject.toml-based projects
Now I am extremely good at making things unnecessarily complicated, thus looking at the wrong place during troubleshooting. Is this poetry or Mac M1 or meltano plugin issue? Appreciate any guidance 🙏
e
If you're using pipelinewise-target-redshift, then the issue is they're pinning psycopg2-binary to a version that doesn't have M1 wheels. The more recent releases do have those wheels: https://pypi.org/project/psycopg2-binary/#files. That said, you are probably only missing some build dependencies in your computer to allow pip to build the wheel: https://www.psycopg.org/docs/install.html#build-prerequisites
a
Thank you, @edgar_ramirez_mondragon, appreciate it. Even I managed to install, it still throws an error to
meltano invoke target-redshift
Copy code
ImportError: dlopen(/Users/alizamin/workspace/testing/poetry/cdp_pipeline/cdp-pipeline/.meltano/loaders/target-redshift/venv/lib/python3.10/site-packages/psycopg2/_psycopg.cpython-310-darwin.so, 0x0002): 

tried: '/Users/alizamin/workspace/testing/poetry/cdp_pipeline/cdp-pipeline/.meltano/loaders/target-redshift/venv/lib/python3.10/site-packages/psycopg2/_psycopg.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')),
I change arch type between
i386
and
arm64
, try it from scratch, no help. One thing is unclear to me, those build dependencies should be installed globally, right? if so how it will help me if that plugin is installed in a separate env, and it points to
loaders/target-redshift/venv/lib/python3.10/site-packages/psycopg2
. I am really confused 😕
I never managed to make it work in Mac M1. Tried to run in Vscode + devcontainer/docker with python 3.8, and it worked 😌 But I still would love to hear anyone who managed it to work in Mac M1. And to be honest I became a bit worried for the state of community driven plugins you are referring to on meltano hub. Take this, the last commit 2 years ago, 24 issues, 14 PR 😰 https://github.com/transferwise/pipelinewise-target-redshift
k
Hi @alizamin! I have the same issue, I tried to install it with this command
meltano add extractor tap-redshift
using Docker but obtain
Extractor 'tap-redshift' could not be installed: Failed to install plugin 'tap-redshift'.
And I tried with this image latest-python3.8. Could you please tell me which image did you use? Thanks a lot!
a
@Karla Yacolca, now I do not remember how I exactly did this (we did not this pipeline after all) , try the basic image 3.8
Copy code
// For format details, see <https://aka.ms/devcontainer.json>. For config options, see the
// README at: <https://github.com/devcontainers/templates/tree/main/src/python>
{
	"name": "Python 3",
	// Or use a Dockerfile or Docker Compose file. More info: <https://containers.dev/guide/dockerfile>
	"image": "<http://mcr.microsoft.com/devcontainers/python:1-3.8-bullseye|mcr.microsoft.com/devcontainers/python:1-3.8-bullseye>"

	// Features to add to the dev container. More info: <https://containers.dev/features>.
	// "features": {},

	// Use 'forwardPorts' to make a list of ports inside the container available locally.
	// "forwardPorts": [],

	// Use 'postCreateCommand' to run commands after the container is created.
	// "postCreateCommand": "pip3 install --user -r requirements.txt",

	// Configure tool-specific properties.
	// "customizations": {},

	// Uncomment to connect as root instead. More info: <https://aka.ms/dev-containers-non-root>.
	// "remoteUser": "root"
}