How do I import 'umap' package in python? - python

After install 'umap' package, I can't import
I tried reinstall pre version (1.3.10, 1.4.0rc1).
But, It's not working
How can I do?
!pip3 install umap-learn
!pip3 install umap-learn[plot]
import umap
This is the error I get:
No module named 'umap'

you probably confused umap and umap-learn libs,
if that's the case, the code below'll solve your problem
https://umap-learn.readthedocs.io/en/latest/basic_usage.html
pip uninstall umap
pip install umap-learn
import umap.umap_ as umap
reducer = umap.UMAP()

Related

module 'scipy.stats._continuous_distns' has no attribute 'frechet_r_gen'

When
import lmoments3 as lm
from lmoments3 import distr
I get module 'scipy.stats._continuous_distns' has no attribute 'frechet_r_gen'
I cded into scipy/stats folder, and there is no presence of 'frechet_r_gen'
I have tried pip install update scipy lmoments3 and pip install --user scipy
I am using conda environments.
https://docs.scipy.org/doc/scipy/release.1.6.0.html
This distribution was removed in scipy 1.6.0. So either install scipy 1.5.4 or make this lmoments3 module update to a more recent scipy version.

ImportError: cannot import name 'constrained_dtw' from 'dtw'

Does anyone know the solution of this problem:
ImportError: cannot import name 'constrained_dtw' from 'dtw'
I installed python DTW (Dynamic Time Warping) module via
pip install dtw
and I tried to solve it by install:
pip install dtaidistance
pip install dtw-python
without any result

How import module in python

I'm trying to import montage2d module from scikit-image:
from skimage.util.montage import montage2d
But this error popped up:
ModuleNotFoundError: No module named 'skimage.util.montage'
I'm pretty sure I installed the scikit-image package as:
pip install scikit-image (0.18.1)
I'm trying pip install scikit-image==0.13.1 but it failed
enter image description here
Try:
from skimage.util import montage
Or, with older versions:
pip install scikit-image==0.13.1
from skimage.util.montage import montage2d

how to install jrjohansson's python wavefunction package?

I have installed QuTip at my CentOS 6.5.
Now I try to run this code
http://nbviewer.jupyter.org/github/jrjohansson/wavefunction/blob/master/Wavefunction-Phase-Qubit-Current-Biased.ipynb
I copy the above codes
from scipy import *
from scipy import optimize
from wavefunction import *
from wavefunction.wavefunction1d import *
....
but have some error when running
ImportError: No module named 'wavefunction'
Then I use
conda install wavefunction
pip install wavefunction
still don't work
No matching distribution found for wavefunction
Package not found
Please help me to resolve this issue about the install of the python 'wavefunction' package
Seems like he hasnt uploaded it to conda or pypi. In such cases, you can install it with git:
pip install git+https://github.com/jrjohansson/wavefunction.git#egg=wavefunction

Issues in using Flask-Upload

I am using Flask-Upload module and for that I have installed Flask-Upload packages from
pip install -e "git://github.com/FelixLoether/flask-uploads#egg=Flask-Uploads"
and import module like this:
from flask.ext.uploads import UploadSet, configure_uploads, IMAGES,UploadNotAllowed
but it gives me error that ImportError: No module named flask.ext.uploads
pls tell me what I am doing wrong here?
Here is pip freeze result :
Flask==0.10.1
Flask-SQLAlchemy==1.0
-e git://github.com/FelixLoether/flask-uploads#d73fb8c8a4859019265e62f27e168a8bb09abfd5#egg=Flask_Uploads-dev
Jinja2==2.7
MarkupSafe==0.18
MySQL-python==1.2.4
ProxyTypes==0.9
PyYAML==3.10
SQLAlchemy==0.9.3
Your git address is wrong. Just use:
pip install flask-uploads
Besides, change imports to this:
from flask_uploads import UploadSet, configure_uploads
Just do:
pip install Flask-Uploads
In past I had a similar problem, but It was a diferent version installed from a version in code, and the message was the same: ImportError: No module named flaskext.uploads. I fixed after do this (two options):
Install an old version of Flask-Uploads in your virtualenv:
pip install Flask-Uploads==0.1.3 and keep the imports: from flaskext.uploads in your code.
Install or update to the last version of Flask-Uploads and change the imports:
pip install Flask-Uploads --upgrade and change the imports for: from flask.ext.uploads in your code. Realize that now have a dot (.) flask.ext

Categories