Skip to content
← Back to Community
How to run Python?
Profile icon
HahaYes

Annotation 2020-05-26 114422
How to run this in Python???
Need detailed explanation for 5 cycles

Answered by ChezCoder [earned 5 cycles]
View Answer
Voters
Profile icon
Muffinlavania
Profile icon
Port8080
Profile icon
HahaYes
Comments
hotnewtop
Profile icon
ChezCoder

set the language to "bash"
put this in the run command: python main.py;python

The run command runs the command in the input box in the language specified. So this would run the command in bash, running the python file.

Profile icon
StudioHawaii

ok

Profile icon
emilyUsesPascal

what do you mean how to run this in python? Are you asking how to run a python file using .replit?

Profile icon
HahaYes
Profile icon
emilyUsesPascal

@HahaYes all you have to do is put python file_you_want_to_run.py as the command. You can also run other bash commands in the run argument

Profile icon
CodeLongAndPros

@emilyUsesPascal Please: python3

*Buntu 18.04 still has python2 installed as /usr/local/bin/python.

Profile icon
HahaYes
Profile icon
CodeLongAndPros

@HahaYes
Whoops. Just found out that repl has a VENV. My bad.

But:
In most Ubuntu system < 20.04, python is python2.7

Profile icon
HahaYes

@CodeLongAndPros Alright. Can you check out my PANDAS data science thing? I would like a few critiques (if you can spare any time)

Profile icon
CodeLongAndPros

@HahaYes 1:

Traceback (most recent call last): File "main.py", line 233, in <module> main() File "main.py", line 227, in main coronavirus = Virus(coronavirus) UnboundLocalError: local variable 'coronavirus' referenced before assignment
Profile icon
HahaYes