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
An issue about "module 'spopt' has no attribute 'version'" #79
Comments
Try running |
I tried while met the same error. |
OK, I will try to take a look at this soon. |
@xf37 Which version of
Even importing Python 3.8.5 | packaged by conda-forge | (default, Aug 29 2020, 01:18:42)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.18.1 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import spenc
/Users/the-gaboardi/miniconda3/envs/py3_spopt/lib/python3.8/site-packages/sklearn/utils/deprecation.py:143: FutureWarning: The sklearn.cluster.spectral module is deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.cluster. Anything that cannot be imported from sklearn.cluster is now part of the private API.
warnings.warn(message, FutureWarning)
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-1-b10ad84211d1> in <module>
----> 1 import spenc
~/miniconda3/envs/py3_spopt/lib/python3.8/site-packages/spenc/__init__.py in <module>
----> 1 from .abstracts import SPENC
~/miniconda3/envs/py3_spopt/lib/python3.8/site-packages/spenc/abstracts.py in <module>
15 from warnings import warn as Warn
16
---> 17 class SPENC(clust.SpectralClustering):
18 def __init__(self, n_clusters=8, eigen_solver=None, random_state=None,
19 n_init=10, gamma=1., affinity='rbf', n_neighbors=10,
~/miniconda3/envs/py3_spopt/lib/python3.8/site-packages/spenc/abstracts.py in SPENC()
455
456 def score(self, X, W, labels=None, delta=.5,
--> 457 attribute_score=skm.calinski_harabaz_score,
458 spatial_score=boundary_fraction,
459 attribute_kw = dict(),
AttributeError: module 'sklearn.metrics' has no attribute 'calinski_harabaz_score' |
Click for full environment details:
|
Yes, sorry, the local development copy underwriting the paper has modified this. |
It is solved by update |
When I ran
sphinx-build -b html docsrc docs
to build docs website, I gotHowever, the first line of the init.py under the folder spopt is:
__version__ = "0.1.0"
I have tried to type
import spopt
andspopt.__version__
in python, and get the right answer. NOT sure why conf.py cannot obtain the version info viaimport spopt
.The text was updated successfully, but these errors were encountered: