jgrss / mpglue

A Python library for image and vector processing
MIT License
8 stars 3 forks source link

how to install mpglue using anaconda #10

Open tzehuey85 opened 3 years ago

tzehuey85 commented 3 years ago

Hi, I would like to know how to install mpglue using conda

jgrss commented 3 years ago

@tzehuey85 You could pip install after creating a virtual environment with conda. For example,

Create your virtual environment:

conda create --name my_env python=3.8 cython numpy

Activate the virtual environment:

conda activate my_env

Install mpglue with pip into the conda environment:

(my_env) pip install git+https://github.com/jgrss/mpglue
jgrss commented 3 years ago

@tzehuey85 Quick follow-up -- mpglue is no longer upgraded on a regular basis. Therefore, if you are looking for a library for image I/O for satellite imagery, I recommend rasterio or geowombat.

tzehuey85 commented 3 years ago

thanks for the guidance. I successfully installed the package but when I tried to import Spfeas in jupyter notebook, an error pop out "ERROR:115:classification.:Scikit-learn must be installed". BTW, I have installed scikit-learn. So, could you please guide me how to solve this problem. thanks in advance

jgrss commented 3 years ago

I have a poor import check for multiple Scikit-learn packages. Scikit-learn may have changed names or dropped a module since last I used mpglue. Can you enter an ipython session and run:

from sklearn import ensemble, tree, metrics, manifold, calibration
from sklearn.feature_selection import chi2, VarianceThreshold
from sklearn.preprocessing import RobustScaler, StandardScaler
from sklearn.neighbors import KNeighborsClassifier
from sklearn.linear_model import LogisticRegression
from sklearn import svm
from sklearn.discriminant_analysis import QuadraticDiscriminantAnalysis as QDA
from sklearn.naive_bayes import GaussianNB
from sklearn.covariance import EllipticEnvelope
from sklearn.cluster import KMeans
from sklearn.semi_supervised import label_propagation
from sklearn.model_selection import GridSearchCV
from sklearn.decomposition import PCA as skPCA
from sklearn.decomposition import IncrementalPCA
from sklearn.gaussian_process import GaussianProcessClassifier
from sklearn.base import BaseEstimator, ClassifierMixin
from sklearn.utils.multiclass import unique_labels

Then paste the traceback of the error.

tzehuey85 commented 3 years ago

Everything is ok. jupyter showed future warning as bellow:

C:\ProgramData\Anaconda3\envs\tampy38\lib\site-packages\sklearn\utils\deprecation.py:143: FutureWarning: The sklearn.semi_supervised.label_propagation 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.semi_supervised. Anything that cannot be imported from sklearn.semi_supervised is now part of the private API. warnings.warn(message, FutureWarning)