Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Checking the version of an ipython library from Terminal?

I'm using iPython from the Anaconda distribution and I want to know how to check the version of some of the libraries from Terminal (using Mac), for example scikit_learn, but don't know the commands...

could someone advise? Thanks!

like image 446
SpicyClubSauce Avatar asked Nov 10 '15 05:11

SpicyClubSauce


People also ask

What version of Python is the library in the terminal?

For example, opening the terminal with Python 3.8 can (surely will) give a different version of a library than opening with Python 3.5 or Python 2.7. Note 2: We avoid using the print function, because its behavior depends on Python 2 or Python 3. We do not need it, and the terminal will show the value of the expression.

How do I check Python version in Linux terminal?

How to Check Python Version in Linux. Most modern Linux distributions come with Python pre-installed. To check the version installed, open a terminal window and entering the following: python ––version.

How to check if IPython is installed or not?

You can simply check the version, as we do with other software packages to check if a software package is installed properly or not. Type in your terminal. It'll print the version if ipython is installed properly. Show activity on this post.

How to check the installed version of a module in Python?

Modules in the standard library do not have individual versions, but follow the Python version. Check with pip command: pip list, pip freeze, pip show. If you are using the Python package management system pip, you can check the information of the installed package with the following command. Execute commands at the command prompt or terminal.


1 Answers

With anaconda, you can find information about the version with the following command:

conda list <package name>

for instance:

conda list scipy

will return (on my system, from my default environment)

# packages in environment at /Users/reblochonmasque/anaconda3:
#
scipy                     0.15.1               np19py34_0 

for your specific question, use:

conda list scikit-learn

To find what versions are available for your system, use:

conda info scikit-learn

if you find that you need to update the library, first update conda

conda update conda

then, updating anaconda will update all your libraries (those installed by conda)

conda update anaconda

if you only want to update this specific library (but you may have to deal with dependencies)

conda update -n <environment name> scikit_learn

If you ever need to revert to a previous version: first find out the history of the versions you updated to

conda list -r scikit-learn

then choose the revision you want to revert to (the number will be from the list given by the command above):

conda install --revision=4 scikit-learn 
like image 147
Reblochon Masque Avatar answered Oct 09 '22 13:10

Reblochon Masque