./bin/cqlsh saying python not found - python

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

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 ?

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 ?

How to determine Anaconda is fully installed on Mac?

When I type "python" into a terminal, I get this:
Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
I am unsure whether this means Ananconda has been successfully installed?
To install the Anaconda-1.9.0-MacOSX-x86_64.sh, open Terminal and run
/bin/bash Anaconda-1.9.0-MacOSX-x86_64.sh
The installer will ask a series of questions and install it in a prefix you determine. When you are done, close the Terminal and open it again. (This is so that your Terminal picks up the new PATH which points to the prefix/bin.)
When it is installed you should see something like the following in the Terminal:
$ python
Python 2.7.6 |Anaconda 1.8.0 (x86_64)| (default, Nov 11 2013, 10:49:09)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>

Categories

Resources