Closed eleozzr closed 4 years ago
Could you try installing using conda
? Unfortunately I have no Mac, making it a bit more difficult to properly test that platform. It seems to build correctly for the Mac from the conda-forge
channel. You should be able to install it simply using
conda install -c conda-forge leidenalg
If that does not work, please report back the error.
Thank you. But when I run the code
conda install -c conda-forge leidenalg
It throws the following errors
(py36) xiaoxiang@ele:~$ conda install -c conda-forge leidenalg
Collecting package metadata (current_repodata.json): failed
NotWritableError: The current user does not have write permissions to a required path.
path: /Users/xiaoxiang/miniconda3/pkgs/cache/b35683e8.json
uid: 501
gid: 20
If you feel that permissions on this path are set incorrectly, you can manually
change them by executing
$ sudo chown 501:20 /Users/xiaoxiang/miniconda3/pkgs/cache/b35683e8.json
In general, it's not advisable to use 'sudo conda'.
Even I run conda with sudo
(py36) xiaoxiang@ele:~$ sudo conda install -c conda-forge leidenalg
Password:
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /Users/xiaoxiang/miniconda3
added / updated specs:
- leidenalg
The following packages will be downloaded:
package | build
---------------------------|-----------------
certifi-2019.9.11 | py37_0 147 KB conda-forge
conda-4.7.12 | py37_0 3.0 MB conda-forge
------------------------------------------------------------
Total: 3.1 MB
The following packages will be UPDATED:
ca-certificates pkgs/main::ca-certificates-2019.8.28-0 --> conda-forge::ca-certificates-2019.9.11-hecc5488_0
The following packages will be SUPERSEDED by a higher-priority channel:
certifi pkgs/main --> conda-forge
conda pkgs/main --> conda-forge
openssl pkgs/main::openssl-1.1.1d-h1de35cc_2 --> conda-forge::openssl-1.1.1c-h01d97ff_0
Proceed ([y]/n)? y
Downloading and Extracting Packages
certifi-2019.9.11 | 147 KB | ##################################################################################### | 100%
conda-4.7.12 | 3.0 MB | ##################################################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
It looks everything is ok. But when I run the example in https://github.com/vtraag/leidenalg, there is an error AttributeError: module 'leidenalg' has no attribute 'find_partition'
. I don't know where I am wrong? Please see the details below.
(py36) xiaoxiang@ele:~$ python
Python 3.6.7 |Anaconda, Inc.| (default, Oct 23 2018, 14:01:38)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import leidenalg
>>> import igraph as ig
>>> G = ig.Graph.Erdos_Renyi(100, 0.1)
>>> part = leidenalg.find_partition(G, leidenalg.ModularityVertexPartition)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'leidenalg' has no attribute 'find_partition'
That is rather strange. What is the value of leidenalg.__path__
? Perhaps something is going wrong with the permissions. Typically, you should install Anaconda as a user (i.e. don't use sudo
when installing Anaconda).
Right now, new binary wheels are being build for the new release, including for macOS. This should fix this issue.
I try all possible solutions in https://github.com/vtraag/leidenalg/issues/1, but it still not works.
For reference
and