relatio-nlp/relatio

Install issues on arm64 (mac book pro M1)

Opened this issue · 4 comments

I ran into installation issue on my M1 Macbook pro. I use python and virtualenv regularly and suspect the following issue might be arm64 related. Do you have any experience with new macs / do you test your installers on those?

TL;DR: it seems to me like relatio 0.2.1 and relatio 0.2.0 are being installed at the some causing a conflict. Second, tensorflow on arm64 might follow other version numbers causing an issue?

I ran into the following issue

mbannert@stash ~> python -m pip install -U relatio                                                                                                                                                             (base)
Collecting relatio
  Using cached relatio-0.2.1-py3-none-any.whl (22 kB)
Collecting matplotlib>=3
  Using cached matplotlib-3.5.1-cp38-cp38-macosx_11_0_arm64.whl (7.2 MB)
Collecting gensim<4,>=3
  Using cached gensim-3.8.3.tar.gz (23.4 MB)
  Preparing metadata (setup.py) ... done
Collecting networkx>=2.5
  Using cached networkx-2.7.1-py3-none-any.whl (2.0 MB)
Collecting pandas>=1
  Downloading pandas-1.4.1-cp38-cp38-macosx_11_0_arm64.whl (10.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.3/10.3 MB 31.7 MB/s eta 0:00:00
Collecting pyvis>=0.1.9
  Using cached pyvis-0.1.9-py3-none-any.whl (23 kB)
Collecting scikit-learn>=0.22
  Using cached scikit_learn-1.0.2-cp38-cp38-macosx_12_0_arm64.whl (6.9 MB)
Collecting relatio
  Using cached relatio-0.2.0-py3-none-any.whl (22 kB)
ERROR: Cannot install relatio==0.2.0 and relatio==0.2.1 because these package versions have conflicting dependencies.

The conflict is caused by:
    relatio 0.2.1 depends on tensorflow>=2
    relatio 0.2.0 depends on tensorflow>=2

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

As for tensorflow I've just installed it via homebrew on a new machine, so it should definitely be update....

Hi Matt,
Thanks for raising the issue.
We test the package on Linux and macOS (x86 platform). It is not tested on M1. We will try to test it on M1 for the new release, but can't make any promises.
In the meantime, note that you can always use the package via Google Colab (e.g., link or on the ETH cluster.
Best,

Hi @PinchOfData thanks for getting back here.
Though the Colab so is a nice option, I am looking to run it locally because I discussed the idea of an R wrapper / R package for relatio /w @elliottash. Also, possibly creating a docker image, so people can run relatio once they got a working docker runtime environment.

Just meant to try relatio out and play around in order to understand the package before looking at an R wrapper. But, maybe collab or Docker might be the way for this as well atm. The issue I raised might also be tensorflow related, what I found strange though are the two relatio versions next to each other...

What do you think about an R package whether it be more native or an wrapper using reticulate or similar.. ?

I am looking to run it locally because I discussed the idea of an R wrapper / R package for relatio /w @elliottash.

I see. That would be great because many political scientists / computational social scientists work with R and aren't familiar with Python. So I think an R package would create much value-added.

Just meant to try relatio out and play around in order to understand the package before looking at an R wrapper.

I don't have an M1 to investigate the issue, so for now we're stuck. I'll try to get a hand on one of those from my lab, but I can't promise anything.

What do you think about an R package whether it be more native or a wrapper using reticulate or similar.. ?

I've never done this before, so I'm not sure how to go about this.

PS: You should know that the API is currently being refactored to be class-oriented, with four main classes handling different aspects of the pipeline: SRL(), Preprocessor(), Embeddings() and NarrativeModel(). So there's going to be some action in the month to come with relatio-v0.3. To save you some time, perhaps the R wrapper / R package should start from this API.

Perfect, I swamped these days anyway. What you suggest sounds like plan. Maybe the wait will even mitigate the M1 issue. Let's keep in touch and let me know once I can test the new API.