Open Kennyc222 opened 2 days ago
There's a whole bunch of issues that could be at work here. I need more details to help you. What python version are using? What numpy version? Is a fortran compiler available?
The easiest way to get around all these issues is to clone the pure_python branch of mistree from github and install it by running pip install .
in the cloned directory. You will then import as
import mistree_pp as mist
.
According toe Google Colab itself, the version of python is 3.10
Numpy is 2.13
And I don't think Fortrain complier at all.
import mistree_pp as mist
doesn't work after pip install
it
So you didn't get any errors when installing? Can you try doing it again and sending me what it outputs while it installs?
actually, I still get error when I even tried to install pure python...now I can't use your package anymore....
If you show me what it says you might be able to.
Another thing you can do is use python 3.8, and a numpy version < 1.23.
I am able to get it running on google colab. You need to do the following:
!mkdir software
!mkdir software/mistree
!git clone -b pure_python https://github.com/knaidoo29/mistree.git software/mistree
!pip install numpy==1.22
!pip install setuptools==59.8.0
!python software/mistree/setup.py build
!python software/mistree/setup.py install
import numpy as np
import matplotlib.pylab as plt
import mistree_pp as mist
x = np.random.random_sample(100) y = np.random.random_sample(100)
mst = mist.GetMST(x=x, y=y)
d, l, b, s, l_index, b_index = mst.get_stats(include_index=True)
plt.figure(figsize=(7., 7.))
plt.scatter(x, y, s=10, color='r')
plt.plot([x[l_index[0]], x[l_index[1]]], [y[l_index[0]], y[l_index[1]]], color='k')
plt.xlim(0., 1.) plt.ylim(0., 1.) plt.xlabel(r'$X$', size=16) plt.ylabel(r'$Y$', size=16) plt.tight_layout() plt.show()
Here is a problem when I intended to install Mistree on GOogle Colab...Now I'm unable to use it at all!
I suspected it is on your side, may you please fix it? Thanks
Kenny