I am working on Ubuntu 16.04 with python 2.7 version.
Scikit image package so installed is 0.10,
I want to upgrade this to 0.13.
How can I do it?
I am working on Ubuntu 16.04 with python 2.7 version.
Scikit image package so installed is 0.10,
I want to upgrade this to 0.13.
How can I do it?
You have two major options:
Using conda/anaconda might be the easiest way, if you need to work with several python packages.
pip allows you to install a specific package, and also if you like, to choose which version should be installed.
To check which version is already install you should run:
pip search scikit-learn
In my case, the search returned a lot of info, part of it is:
scikit-learn (0.19.0) - A set of python modules for machine learning and data mining
INSTALLED: 0.17.1
LATEST: 0.19.0
You can install the latest version of scikit-learn using the following command:
pip install -U scikit-learn
In order to install a specific version of the package, you can use:
pip install -Iv scikit-learn==0.13
scikit site official install instructions
Installing the latest release
Scikit-learn requires:
Python (>= 2.7 or >= 3.3), NumPy (>= 1.8.2), SciPy (>= 0.13.3).If you already have a working installation of numpy and scipy, the easiest way to install scikit-learn is using pip
pip install -U scikit-learnor conda:
conda install scikit-learnIf you have not installed NumPy or SciPy yet, you can also install these using conda or pip. When using pip, please ensure that binary wheels are used, and NumPy and SciPy are not recompiled from source, which can happen when using particular configurations of operating system and hardware (such as Linux on a Raspberry Pi). Building numpy and scipy from source can be complex (especially on Windows) and requires careful configuration to ensure that they link against an optimized implementation of linear algebra routines. Instead, use a third-party distribution as described below.
If you must install scikit-learn and its dependencies with pip, you can install it as scikit-learn[alldeps]. The most common use case for this is in a requirements.txt file used as part of an automated build process for a PaaS application or a Docker image. This option is not intended for manual installation from the command line.
I tried the below command:
pip install --user --upgrade scikit-learn==0.15.1 (my required version)
But this may result in error if you are using any virtual environment by python like venv or virtualenv or conda. In order to avoid the error, use the below command:
pip install --upgrade scikit-learn==0.13 (your required version)
I have faced the same issue but resolved using the later command. You need not use the sudo command also with pip(just for alerting you, hope you have also faced an error using sudo with pip.) Hope my answer helps.
Installing a different/latest version upgrades your version for this particular module. No different upgrade/update command is available. If available please do share. Thanks.