Matplotlib version does not match Anaconda version - python

I've installed the Anaconda2-5.1.0-Linux-x86_64 on Ubuntu 16.04 LTS, and when I run conda list I see that the matplotlib version should be 2.1.2. But when I run python I get that the version is 2.0.2 :
$ python
Python 2.7.14 |Anaconda, Inc.| (default, Dec 7 2017, 17:05:42)
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib
>>> matplotlib.__version__
'2.0.2'
Why the python package does point on the matplotlib version from Anaconda?

Related

conda downgrades active python in an environment after install packages

It's very strange. I have Python3.10.3 in an activated conda environment:
python
gives
Python 3.10.4 (main, Mar 31 2022, 03:38:35) [Clang 12.0.0 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
I can install packages but then the version of the Python in the environment changes to 3.9.12 ? Example:
python
gives
Python 3.9.12 (main, Apr 5 2022, 01:53:17)
[Clang 12.0.0 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
Typically, I want to install pytorch and following the installation, I'll have the downgraded version of Python available if I run "python".

why is pyenv still prioritizing the system's python version when I run `python3.x`?

I have pyenv installed and everything works pretty well except for one aspect: when I run the command python3.9, my system still points to my system's version of python (3.9.13). However, I would like to make it point to my pyenv installed version when running python3.9:
❯ pyenv versions
system
3.7.10
3.8.10
* 3.9.5 (set by /Users/username/.python-version)
❯ python3
Python 3.9.5 (default, Jul 7 2022, 20:35:58)
[Clang 13.1.6 (clang-1316.0.21.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
❯ python3.9
Python 3.9.13 (main, May 24 2022, 21:13:51)
[Clang 13.1.6 (clang-1316.0.21.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
❯ python3.9 --version
Python 3.9.13
❯ python3 --version
Python 3.9.5
Note that the issue occurs just when running python3.9, not python3.
What's wrong in my configuration?

How could I resume my own python configuration after quiting anaconda

Before installing anaconda, I have my own python configurations:
$ python
Python 3.5.2 (default, Nov 23 2017, 16:37:01)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
...
After installing anaconda, however, without creating a new environment, my default environment is still changed:
$ python
Python 3.7.0 (default, Jun 28 2018, 13:15:42)
[GCC 7.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
...
How could I use my own 3.5.2 python environment when not activating the anaconda python environment ?

./bin/cqlsh saying python not found

I have installed cassandra 3.0.0 and trying to connect to connect cqlsh. when i try to hit ./bin/cqlsh from the dir of installed cassandra I am getting
python not found. I am using ubunut14.04LTS
when i type python2 in my terminal it says
python2
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
when i type python3 in my terminal it says
python3
Python 3.4.3 (default, Oct 14 2015, 20:28:29)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
so this mean it is already installed . But yes when i type
python in terminal it says
python
The program 'python' is currently not installed. You can install it by typing:
apt-get install python-minimal
even when i install python-minimal it doesn work.
please suggest..
Create a symbolic link /usr/bin/python pointing to either /usr/bin/python2 or /usr/bin/python3

ImportError: No module named bluetooth after update python 2.7.3 -> 2.7.9

i update python from 2.7.3 to 2.7.9 in raspberry ..
first i download source from python.org and configure & make & make install
no when i command python in terminal python 2.7.9 executed ...
Python 2.7.9 (default, Jan 27 2015, 21:20:44)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
but all module that i installed from apt-get install is now unknown ...
like sudo apt-get install python-bluez
how can i fix it ?

Categories

Resources