-
Notifications
You must be signed in to change notification settings - Fork 25
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
Install fails on M1 macs #201
Comments
@xinyuejohn you're using a M1 right? Got any idea? |
Prior to installing pertpy, install Qt5 via brew (and follow the directions to add to path), restart terminal, then run: Then pip install pertpy works |
Note: |
Accidentally closed when trying to add additional issue: Setting up developer environment as described here At the ` • Installing pyqt5-qt5 (5.15.2): Failed RuntimeError Unable to find installation candidates for pyqt5-qt5 (5.15.2) Installing pyqt5 separately as described above does not fix. `make install Package operations: 51 installs, 0 updates, 0 removals • Installing pyqt5-qt5 (5.15.2): Failed RuntimeError Unable to find installation candidates for pyqt5-qt5 (5.15.2) at ~/miniforge3/envs/pertpy-distances/lib/python3.9/site-packages/poetry/installation/chooser.py:105 in choose_for make: *** [install] Error 1` |
Not sure where to go from here @Zethson -- we considered removing the requirement from our branch but we're not sure where it's coming from in the first place |
It's from ipykernel I think |
Sorry for the late reply. I am using Mac with intel i5. |
The problematic |
@Moomboh Indeed. ete3 requires it for plotting. So I'll need to make these dependencies optional urgh. |
If I did things correctly, ete3 and pyqt5 should now be optional dependencies. @tessadgreen can you please test the latest development branch? |
Apparently people are working on it etetoolkit/ete#656 |
Installing from the latest development branch following the directions in the Contributor Guide works, and I'm seeing the 'ete3' warning on import. Nox runs successfully and I'm able to import pertpy into python. Should note that the Qt5 brew install was system wide so it is available in the new environment for me/I don't know if it now works without that step. |
Can confirm that setting up dev environment according to the Contributor Guide also works for me on Apple Silicon. Though to get poetry run pip install nox nox-poetry
poetry run nox I also managed to get pertpy running including rtools support and ete3 running on Apple Silicon:
(As of this writing nightly was at theislab/pertpy@3e6a702) Now pertpy should be working fine and you should be able to use all features 🎉 import pertpy as pt I still get the ete3 warning on import, but I think this is due to a bug in pertpy/tools/init.py#L10 I think pertpy/tools/init.py#L10 should be instead: try:
from pertpy.tools.coda._sccoda import Sccoda
from pertpy.tools.coda._tasccoda import Tasccoda
except ImportError as e:
if "ete3" in str(e):
print(
"[bold yellow]To use sccoda or tasccoda please install ete3 with `pip install ete3`"
)
else:
raise e @Zethson should I open a separate issue for this? |
@Moomboh thank you very much for your in depth response. Yes, please open a separate issue for this. I'd also be happy to get a PR in with your suggested improvement and we can discuss it directly there! |
New brew install required by the _dialogue.py. The new linear programming solver requires system-wise ipopt install on Mac, which can be done with |
It should only be required if you try to run DIALOGUE though, right? Also, |
Oh, yes sorry this came up when trying to run Dialogue, the install was fine/didn't error and I just had the problem when I tried to run the multifactor PMD with the linear programming addition. I got the error |
Yeah, I'll write up proper installation instructions soon, sorry. |
Update: we're failing on M3 mac now, even when following the directions in the documentation to the letter.
Run the command as directed by brew to add to your path
https://scipy.github.io/devdocs/building/index.html#system-level-dependencies
Run whatever brew tells you to run
and then run the command that spits out. Create a new environment using mamba (here with python 3.11) and activate it [note: current docs have conflicting python version numbers]
That works, and pytorch is successfully interfacing with MPS (yay) To make pertpy loadable, then need to run
And then we're able to import, though I do get the following warning.
|
update: although this installs and runs, Jax is in CPU-only mode. Trying to figure out if that's fixable via some combination of this and the actual directions |
Describe the bug
Unable to install using pip on M1 mac (Tessa and @stefanpeidli)
To Reproduce
mamba create -n pertpy_env python=3.9 conda activate pertpy_env pip install pertpy
(pertpy_env) stefanpeidli@Stefans-MBP ~ % pip install pertpy Collecting pertpy Using cached pertpy-0.3.0-py3-none-any.whl (82 kB) Collecting muon>=0.1.2 Using cached muon-0.1.2-py3-none-any.whl (287 kB) Collecting pypi-latest>=0.1.1 Using cached pypi_latest-0.1.2-py3-none-any.whl (10 kB) Collecting scipy<2.0.0,>=1.9.3 Downloading scipy-1.10.0-cp39-cp39-macosx_12_0_arm64.whl (28.9 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
28.9/28.9 MB 12.3 MB/s eta 0:00:00Collecting PyYAML>=5.4.1
Downloading PyYAML-6.0-cp39-cp39-macosx_11_0_arm64.whl (173 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
174.0/174.0 kB 8.3 MB/s eta 0:00:00
Collecting arviz<0.15.0,>=0.14.0
Using cached arviz-0.14.0-py3-none-any.whl (1.7 MB)
Collecting ipywidgets>=7.6.5
Downloading ipywidgets-8.0.4-py3-none-any.whl (137 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 137.8/137.8 kB 8.5 MB/s eta 0:00:00
Collecting scanpy>=1.8.1
Downloading scanpy-1.9.1-py3-none-any.whl (2.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2.0/2.0 MB 12.1 MB/s eta 0:00:00 Collecting pyqt5<6.0.0,>=5.15.7 Using cached PyQt5-5.15.9.tar.gz (3.2 MB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [29 lines of output]
Traceback (most recent call last):
File "/Users/stefanpeidli/miniconda3/envs/pertpy_env/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 144, in prepare_metadata_for_build_wheel
hook = backend.prepare_metadata_for_build_wheel
AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'
` note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.`
Expected behavior
Installs and loads
System [please complete the following information]:
Additional context
brew install of Qt5 seems like it might be necessary, but we're still having trouble with it freezing on the license step for pyqt5 install even after that
The text was updated successfully, but these errors were encountered: