Closed elopezfune closed 4 years ago
It appears that you are using a different library having the same namespace. What is the output of pip freeze?
The output is matrixprofile==1.1.2 matrixprofile-ts==0.0.9
Yes, this is the problem. matrixprofile-ts has the same namespace and is more than likely the library being imported. Either create a new conda/virtual environment for matrixprofile or uninstall matrixprofile-ts. The latter library is no longer maintained.
I did but now it gives me another error
AttributeError Traceback (most recent call last)
Please post the imports, pip freeze results, mp.__dict__
output, and mp.__version__
output.
I am reproducing the example in https://github.com/matrix-profile-foundation/article-matrix-profile-intro/blob/master/Matrix%20Profile%20Example.ipynb
import matrixprofile as mp
mp.__dict__
{'__name__': 'matrixprofile',
'__doc__': None,
'__package__': 'matrixprofile',
'__loader__': <_frozen_importlib_external._NamespaceLoader at 0x7f3393fe00b8>,
'__spec__': ModuleSpec(name='matrixprofile', loader=None, origin='namespace', submodule_search_locations=_NamespacePath(['/home/elopezfune/.local/lib/python3.6/site-packages/matrixprofile'])),
'__path__': _NamespacePath(['/home/elopezfune/.local/lib/python3.6/site-packages/matrixprofile'])}
mp.__version__
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-12-93d9f20194b9> in <module>
----> 1 mp.__version__
AttributeError: module 'matrixprofile' has no attribute '__version__'
What about pip freeze? This still seems to be an environmental issue.
the pip freeze gives matrixprofile==1.1.2 pip freeze results gives the same matrixprofile==1.1.2
Please try the following:
# via conda
conda create --name mptest
# via virtualenv
virtualenv mptest
# via conda
conda activate mptest
# via virtualenv (may be different for Windows)
source mptest/bin/activate
3.a install pip
If you are using conda, you may need to install pip.
conda install pip
3.b install matrixprofile
pip install matrixprofile
import matrixprofile as mp
import numpy as np
ts = np.arange(100) profile, figures = mp.analyze(ts)
You should not receive any errors when going through these steps unless there is some larger environmental issue. Maybe one issue is that your notebook does not have the same environment as you expect?
Well, I tried your procedure and I am still getting
(mptest) elopezfune@elopezfune:~$ python3 '/home/elopezfune/Téléchargements/legend.py'
Traceback (most recent call last):
File "/home/elopezfune/Téléchargements/legend.py", line 5, in
I'd recommend un-installing matrixprofile-ts, as it's probably a namespace collision between packages.
On Sat, Jul 4, 2020, 9:56 AM Ernesto Lopez Fune notifications@github.com wrote:
Well, I tried your procedure and I am still getting
(mptest) elopezfune@elopezfune:~$ python3 '/home/elopezfune/Téléchargements/legend.py' Traceback (most recent call last): File "/home/elopezfune/Téléchargements/legend.py", line 5, in profile, figures = mp.analyze(ts) AttributeError: module 'matrixprofile' has no attribute 'analyze'
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/matrix-profile-foundation/matrixprofile/issues/33#issuecomment-653775622, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB53ISBIBQFEY5F3KE7VERDRZ47LPANCNFSM4OPRMHAA .
@elopezfune do you have any further updates on this issue? It may be easier to debug in our Discord chat. You can find a link within the code repository Readme
I am re-installing everything from the beginning
So, I uninstalled matrixprofile and re-installed everything from the beginning. Now ModuleNotFoundError: No module named 'matrixprofile' when importing I think I will look for other alternatives to Motif discovery Thanks for the help anyways!
Thank you for the update. Good luck.
I installed matrixprofile a week ago and I am trying to reproduce the example in the documentation https://matrixprofile.docs.matrixprofile.org/examples/ECG_Annotation_Vectors.html but as soon as I arrive to
I get the error:
I even tried mp.compute and I got the error
AttributeError: module 'matrixprofile' has no attribute 'compute'
Am I doing something wrong or are there missing packages or....?