You are not logged in.

#1 2014-04-20 14:25:49

h4ld3n
Member
Registered: 2013-09-16
Posts: 14

python - command not found [Solved]

Hey guys,
I'm trying to run a simple python script from within vim, but when I type :w !python I get: "bin/bash/ python command not found".
My feeling is that I miss something really stupid, like downloading something important, but I can't find the answer. Can you help me solve it?
Thenx in advance.

Last edited by h4ld3n (2014-04-23 14:11:28)

Offline

#2 2014-04-20 14:32:54

Stebalien
Member
Registered: 2010-04-27
Posts: 1,239
Website

Re: python - command not found [Solved]

Please post the script.


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C

Offline

#3 2014-04-20 14:34:59

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,441
Website

Re: python - command not found [Solved]

/usr/bin/python is part of the python package. Could it be that you want python2?

Your vim command and the error message look strange to me. Are you sure that's what you typed, and what the message was?

Last edited by WorMzy (2014-04-20 14:35:15)


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#4 2014-04-20 14:58:40

h4ld3n
Member
Registered: 2013-09-16
Posts: 14

Re: python - command not found [Solved]

WorMzy wrote:

/usr/bin/python is part of the python package. Could it be that you want python2?

Your vim command and the error message look strange to me. Are you sure that's what you typed, and what the message was?

I downloaded the python package and it worked. The error wasn't with vim, the terminal gave the same error with pthon filename.py. Did it means that I used the python 3 interpeter for the code? Because I want python 2.
Thenx for the help so far.

edit: python2 insted of python worked. Thenk you for the help, It was really silly of me missing it. Thenks.

Last edited by h4ld3n (2014-04-20 15:04:58)

Offline

#5 2014-04-20 15:05:15

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: python - command not found [Solved]

Remove python, install python2 package and see if the code works.

Offline

#6 2014-04-22 11:24:21

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: python - command not found [Solved]

karol wrote:

Remove python, install python2 package and see if the code works.

No reason to remove python(3)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#7 2014-04-22 12:14:33

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: python - command not found [Solved]

If the command "python" cannot be found, I think h4ld3n never even installed python(3), but just assumed the python2 package would provide a "python" executable.

Anyway, I think this can be marked [SOLVED] now.

Offline

#8 2014-04-23 01:26:35

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: python - command not found [Solved]

Mr.Elendig wrote:
karol wrote:

Remove python, install python2 package and see if the code works.

No reason to remove python(3)

Seems OP installed python3 just for this piece of code, so no reason to keep it installed if he prefers python2.

Offline

Board footer

Powered by FluxBB