Open wyattmcdonnell opened 5 years ago
hi Wyatt! I think this has to do with setup.py not installing pybind11 before it tries to install hnswlib. Does the pip install work if you first install pybind11 followed by pip install parc pip install pybind11 then pip install parc
Hi Shobi!
If I pip install pybind11
and then pip install parc
, I get effectively the same error, but with numpy
, as follows:
File "/mnt/home/wyatt.mcdonnell/anaconda3/envs/parc_pip/lib/python3.7/distut
ils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/mnt/home/wyatt.mcdonnell/anaconda3/envs/parc_pip/lib/python3.7/distut
ils/dist.py", line 985, in run_command
cmd_obj.run()
File "/mnt/home/wyatt.mcdonnell/anaconda3/envs/parc_pip/lib/python3.7/site-p
ackages/setuptools/command/build_ext.py", line 84, in run
_build_ext.run(self)
File "/mnt/home/wyatt.mcdonnell/anaconda3/envs/parc_pip/lib/python3.7/distut
ils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/tmp/pip-install-_xfidwoz/hnswlib/setup.py", line 89, in build_extensi
ons
import numpy as np
ModuleNotFoundError: No module named 'numpy'
----------------------------------------
ERROR: Failed building wheel for hnswlib
Running setup.py clean for hnswlib
Congrats to Shobi and team for the official publication in Bioinformatics yesterday!
@wyattmcdonnell I can't comment on how this would work in an AWS Linux instance, but in OS X Catalina, the steps below worked to install PARC inside Anaconda:
conda install pybind11 numpy scipy pandas matplotlib sklearn
pip install hnswlib python-igraph leidenalg
Successfully built python-igraph leidenalg hnswlib
Installing collected packages: python-igraph, leidenalg, hnswlib, parc
Successfully installed hnswlib-0.3.4 leidenalg-0.7.0 parc-0.19 python-igraph-0.7.1.post6
Note: you may need to restart the kernel to use updated packages.
pip install sklearn
Successfully installed joblib-0.14.1 scikit-learn-0.22.1 sklearn-0.0
input data has shape 150 (samples) x 4 (features)
Starting local pruning based on Minkowski metric at 2 s.dev above mean
Starting global pruning
Starting community detection
0.01191401481628418
list of cluster labels and populations 6 [(0, 36), (1, 34), (2, 29), (3, 21), (4, 19), (5, 11)]
time elapsed 0.1 seconds
target is 0
cluster 2 has majority 0 with population 29
cluster 3 has majority 0 with population 21
target 0 has f1-score of 100.00
...
target is 9
cluster 1 has majority 9 with population 147
target 9 has f1-score of 88.69
f1-score (unweighted) mean 95.28 %
f1-score weighted (by population) 95.30 %
...and some plots, too.
I realize your comment is a few months old, but I hope that helps someone get started on OS X!
Hey Shobi!
I get the following when trying to
pip install parc
in a fresh Anaconda environment with Python 3.7 on both Mac OS X 10.14.6 (Mojave) and on AWS' flavor of Linux:For what it's worth, if I manually install everything first with the following bash script and then clone
PARC.git
andpython3 setup.py install
everything works!Cheers, Wyatt