Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

python command doesn't nothing

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
Hutik
Posts: 5
Joined: 2020-06-22 14:57

python command doesn't nothing

#1 Post by Hutik »

If I use the command: python <file> it does absoluthely nothing. Same with "python3". I'm using a conda environment. I don't know if I'm missing something, on Windows it worked like this and I'm new to Linux.

Edit: the python command alone is working, but it is not able to open a file
Last edited by Hutik on 2020-06-22 19:52, edited 1 time in total.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: python command doesn't nothing

#2 Post by Head_on_a_Stick »

What is the exact content of the file and what did you expect it to do?

It seems to work for me:

Code: Select all

$ cat hello.py
print ("Hello, World!")
$ python hello.py
Hello, World!
$
deadbang

cuckooflew
Posts: 677
Joined: 2018-05-10 19:34
Location: Some where out west
Been thanked: 1 time

Re: python command doesn't nothing

#3 Post by cuckooflew »

on Windows it worked like this and I'm new to Linux.
Linux is not Windows, welcome to Linux and the Debian User Forums.
I'm using a conda environment.
Are you even using Debian ? There is not a "conda" environment in the Debian repositories, I don't think this is a Debian package or software,...
Also, I tried the "Hello World", program as shown ,and it worked fine for me as well, but I am using Debian,with no "conda environment", just pure Debian
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!

Hutik
Posts: 5
Joined: 2020-06-22 14:57

Re: python command doesn't nothing

#4 Post by Hutik »

Head_on_a_Stick wrote:What is the exact content of the file and what did you expect it to do?
[/code]
It trains a neural network, and it's full of print statements

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5346
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 12 times
Been thanked: 66 times

Re: python command doesn't nothing

#5 Post by dilberts_left_nut »

Hutik wrote:It trains a neural network
Seems not.
AdrianTM wrote:There's no hacker in my grandma...

Hutik
Posts: 5
Joined: 2020-06-22 14:57

Re: python command doesn't nothing

#6 Post by Hutik »

cuckooflew wrote:Linux is not Windows, welcome to Linux and the Debian User Forums.
Wow, I didn't know that.
Are you even using Debian ? There is not a "conda" environment in the Debian repositories, I don't think this is a Debian package or software,...
Also, I tried the "Hello World", program as shown ,and it worked fine for me as well, but I am using Debian,with no "conda environment", just pure Debian
I'm using Debian, as you said we're in the Debian User Forum. Conda is not in the official repositories, however it doesn't mean it's not a Debian software.
Last edited by Hutik on 2020-06-22 20:01, edited 2 times in total.

Hutik
Posts: 5
Joined: 2020-06-22 14:57

Re: python command doesn't nothing

#7 Post by Hutik »

dilberts_left_nut wrote:
Hutik wrote:It trains a neural network
Seems not.
No problem running it in VSCode, it doesn't work only in terminal


Hutik
Posts: 5
Joined: 2020-06-22 14:57

Re: python command doesn't nothing

#9 Post by Hutik »

arochester wrote:Is the file made executable?

https://techendo.com/post/how-to-run-a- ... cript.html
Thank you, it was such a dumb thing. I thought it has to be executable to been run without the python command.

cuckooflew
Posts: 677
Joined: 2018-05-10 19:34
Location: Some where out west
Been thanked: 1 time

Re: python command doesn't nothing

#10 Post by cuckooflew »

Unread postby Hutik » 2020-06-22 19:59
cuckooflew wrote:
Linux is not Windows, welcome to Linux and the Debian User Forums.

Wow, I didn't know that.
That is what I figured, but that's ok, you will start learning the differences.
I'm using Debian, as you said we're in the Debian User Forum.
Yea, but that does not mean you are using Debian, you would be surprised how many new members we get and it turns out they are not using Debian,...
Conda is not in the official repositories, however it doesn't mean it's not a Debian software.
Yes it does, where you got it ?How you installed it, could have a lot to do with why it did not work as expected. I do hope you at least read some of the documentation about installing software that came from random websites, outside of the Debian repositories,... but you seem to be so much smarter then me, I am sure I don't need to tell you about that.
by arochester » 2020-06-22 20:02
Is the file made executable?
I love how the tutorial starts out:
If you cannot run or execute a python script, there is no point in being a programmer. I mean, the ultimate goal of a developer is to write scripts that are executable and actionable
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!

Post Reply