Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Anaconda: find version with Spyder IDE

I just ran into an issue. I had an installation of Anaconda from 2016, it was version 4.1. I then downloaded a new version of Anaconda version 5.1. I installed this version on windows 7. I have now 3 versions of Anaconda on my windows machine, one is for Anaconda with python-2 (v4.1 anaconda), and Anaconda v4.1 with python-3. And the new Anaconda v5.1 with Python-3.

In the older versions when using Spyder IDE, when the console came up, it would state the python version and the version of Anaconda. Now, in the new version it no longer states the Anconda version,

IT now only shows this: 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 10:22:32) [MSC v.1900 64 bit (AMD64)]

So the first numbers represents the version of python, the rest says Anaconda but not the version.

Is there a way to find out in Spyder IDE which version of Anaconda it is accessing.

Hope someone can help.

like image 301
Palu Avatar asked May 21 '18 22:05

Palu


People also ask

How can I tell what version of Anaconda Spyder I have?

Running the tests with Spyder This can be done either by typing spyder in a terminal or inside the Anaconda Prompt, or by starting Spyder through the Anaconda Navigator. The current version of Spyder is 4.1. Spyder may ask you if you want to install kite .

Is Spyder IDE included in Anaconda?

Spyder, the Scientific Python Development Environment, is a free integrated development environment (IDE) that is included with Anaconda. It includes editing, interactive testing, debugging, and introspection features.

What version of Python is Spyder using?

Requirements. The requirements to run Spyder are: Python 2.7 or >=3.3.

What version of Anaconda Do I have Python?

Anaconda Navigator has been updated to v2. 3.1. This installer uses python-3.9. This is the first release that provides a python-3.10 variant for anaconda metapackages.


2 Answers

Try this in your command line:

conda list Spyder$
like image 70
Ghazal Avatar answered Oct 21 '22 13:10

Ghazal


Instead of 'versions of Anaconda' you should think in terms of conda environments. Anaconda is just a collection of conda packages including conda itself, Python, Spyder, the Anaconda Navigator and so on, so any given 'version of Anaconda' just means a set of specific versions of those packages.

So if you think you have more than one 'version of Anaconda' installed, the question is which packages you actually have different versions of and where they are. Do you have different conda environments with different versions of Python and other packages (which is how it's supposed to work) or do you somehow have two or three different installations with root environments in different places (probably not a good idea)?

To find out from a Python prompt where your Python interpreter is - including from the console in Spyder - you can type

import sys
sys.executable

When you think you're using Spyder 'in' a particular 'Anaconda version', how are you starting Spyder - by typing a command, from the Anaconda Navigator, or via a Start menu shortcut? If it's one of the first two then you should just activate the environment you want to use before starting Spyder. If you're using a shortcut then it needs to be specific to the environment - creating a new env in Windows Anaconda may or may not create these shortcuts (if this is the problem, see the docs or ask a new question).

If you've activated an environment that contains Python and Spyder before running Spyder, then sys.executable should point to the Python interpreter in that environment and you should have access to the specific versions of the modules that you have installed in that environment.

If your installation is indeed messed up with more than one root environment then you might do best to export the list of packages in each of your environments to a file with conda env export, clean up your installation so you have only one, then recreate the environments from the environment files you exported.

like image 37
nekomatic Avatar answered Oct 21 '22 14:10

nekomatic