Cannot run py as command [duplicate]Is it possible to use “py” instead of “python” at the command line in Linux?User input and command line argumentsCalling an external command in PythonIs there a way to run Python on Android?How to get file creation & modification date/times in Python?How to read/process command line arguments?What is the meaning of a single and a double underscore before an object name?Proper way to declare custom exceptions in modern Python?Use different Python version with virtualenvHow to check version of python modules?Why is “1000000000000000 in range(1000000000000001)” so fast in Python 3?
Escape Velocity - Won't the orbital path just become larger with higher initial velocity?
Are there really no countries that protect Freedom of Speech as the United States does?
Are there any cons in using rounded corners for bar graphs?
Piecewise convexity and global convexity
What can Amex do if I cancel their card after using the sign up bonus miles?
Why aren’t there water shutoff valves for each room?
Global BGP Routing only by only importing supernet prefixes
What is the safest way to leave my MacBook on 24/7 with macOS Mojave?
Luggage Storage at Szechenyi Baths
How can I communicate my issues with a potential date's pushy behavior?
What is the たんだ in と思ってたんだ for the sentence in question?
Crippling fear of hellfire &, damnation, please help?
Will using a resistor in series with a LED to control its voltage increase the total energy expenditure?
Are there examples in Tanach of 3 or more parties having an ongoing conversation?
If a person claims to know anything could it be disproven by saying 'prove that we are not in a simulation'?
Would the USA be eligible to join the European Union?
How would armour (and combat) change if the fighter didn't need to actually wear it?
What kind of liquid can be seen 'leaking' from the upper surface of the wing of a Boeing 737-800?
Are those flyers about apartment purchase a scam?
How do I ask for 2-3 days per week remote work in a job interview?
Are employers legally allowed to pay employees in goods and services equal to or greater than the minimum wage?
Why does Japan use the same type of AC power outlet as the US?
Did DOS zero out the BSS area when it loaded a program?
Are there any other rule mechanics that could grant Thieves' Cant?
Cannot run py as command [duplicate]
Is it possible to use “py” instead of “python” at the command line in Linux?User input and command line argumentsCalling an external command in PythonIs there a way to run Python on Android?How to get file creation & modification date/times in Python?How to read/process command line arguments?What is the meaning of a single and a double underscore before an object name?Proper way to declare custom exceptions in modern Python?Use different Python version with virtualenvHow to check version of python modules?Why is “1000000000000000 in range(1000000000000001)” so fast in Python 3?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
This question already has an answer here:
Is it possible to use “py” instead of “python” at the command line in Linux?
2 answers
On windows I can run py test.py
having python 3 installed.
But on Ubuntu, py
is not recognized as command, but python3
is.
Is there anyway I can make py
the same command as python3?
python python-3.x
marked as duplicate by Community♦ Mar 29 at 12:21
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
Is it possible to use “py” instead of “python” at the command line in Linux?
2 answers
On windows I can run py test.py
having python 3 installed.
But on Ubuntu, py
is not recognized as command, but python3
is.
Is there anyway I can make py
the same command as python3?
python python-3.x
marked as duplicate by Community♦ Mar 29 at 12:21
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
Is it possible to use “py” instead of “python” at the command line in Linux?
2 answers
On windows I can run py test.py
having python 3 installed.
But on Ubuntu, py
is not recognized as command, but python3
is.
Is there anyway I can make py
the same command as python3?
python python-3.x
This question already has an answer here:
Is it possible to use “py” instead of “python” at the command line in Linux?
2 answers
On windows I can run py test.py
having python 3 installed.
But on Ubuntu, py
is not recognized as command, but python3
is.
Is there anyway I can make py
the same command as python3?
This question already has an answer here:
Is it possible to use “py” instead of “python” at the command line in Linux?
2 answers
python python-3.x
python python-3.x
edited Mar 27 at 10:56
Ayxan
4,8711 gold badge11 silver badges35 bronze badges
4,8711 gold badge11 silver badges35 bronze badges
asked Mar 27 at 10:52
AzazelAzazel
245 bronze badges
245 bronze badges
marked as duplicate by Community♦ Mar 29 at 12:21
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Community♦ Mar 29 at 12:21
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Community♦ Mar 29 at 12:21
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
You could always add alias py='python3'
to your .bashrc file.
And could you pls tell me where is that file? I kinda new on ubuntu
– Azazel
Mar 27 at 10:55
Go to your home directory and typels -a
.
– berkelem
Mar 27 at 10:56
Okey, and once inside that file, where should I type that? On themore alias
section?
– Azazel
Mar 27 at 10:59
Anywhere is fine, but best to put it on a newline at the end so you can keep track of the changes you make to it. If there is an alias section, then put it there.
– berkelem
Mar 27 at 11:00
1
You need to source the .bashrc file. Typesource ~/.bashrc
and you should be good to go.
– berkelem
Mar 27 at 11:03
|
show 4 more comments
To add Up , If the script wants to call the interpreter
- Make sure the first line of your file has #!/usr/bin/env python.
- Make it executable - chmod +x .py.
- And run it as ./.py
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You could always add alias py='python3'
to your .bashrc file.
And could you pls tell me where is that file? I kinda new on ubuntu
– Azazel
Mar 27 at 10:55
Go to your home directory and typels -a
.
– berkelem
Mar 27 at 10:56
Okey, and once inside that file, where should I type that? On themore alias
section?
– Azazel
Mar 27 at 10:59
Anywhere is fine, but best to put it on a newline at the end so you can keep track of the changes you make to it. If there is an alias section, then put it there.
– berkelem
Mar 27 at 11:00
1
You need to source the .bashrc file. Typesource ~/.bashrc
and you should be good to go.
– berkelem
Mar 27 at 11:03
|
show 4 more comments
You could always add alias py='python3'
to your .bashrc file.
And could you pls tell me where is that file? I kinda new on ubuntu
– Azazel
Mar 27 at 10:55
Go to your home directory and typels -a
.
– berkelem
Mar 27 at 10:56
Okey, and once inside that file, where should I type that? On themore alias
section?
– Azazel
Mar 27 at 10:59
Anywhere is fine, but best to put it on a newline at the end so you can keep track of the changes you make to it. If there is an alias section, then put it there.
– berkelem
Mar 27 at 11:00
1
You need to source the .bashrc file. Typesource ~/.bashrc
and you should be good to go.
– berkelem
Mar 27 at 11:03
|
show 4 more comments
You could always add alias py='python3'
to your .bashrc file.
You could always add alias py='python3'
to your .bashrc file.
answered Mar 27 at 10:54
berkelemberkelem
1,0252 gold badges9 silver badges22 bronze badges
1,0252 gold badges9 silver badges22 bronze badges
And could you pls tell me where is that file? I kinda new on ubuntu
– Azazel
Mar 27 at 10:55
Go to your home directory and typels -a
.
– berkelem
Mar 27 at 10:56
Okey, and once inside that file, where should I type that? On themore alias
section?
– Azazel
Mar 27 at 10:59
Anywhere is fine, but best to put it on a newline at the end so you can keep track of the changes you make to it. If there is an alias section, then put it there.
– berkelem
Mar 27 at 11:00
1
You need to source the .bashrc file. Typesource ~/.bashrc
and you should be good to go.
– berkelem
Mar 27 at 11:03
|
show 4 more comments
And could you pls tell me where is that file? I kinda new on ubuntu
– Azazel
Mar 27 at 10:55
Go to your home directory and typels -a
.
– berkelem
Mar 27 at 10:56
Okey, and once inside that file, where should I type that? On themore alias
section?
– Azazel
Mar 27 at 10:59
Anywhere is fine, but best to put it on a newline at the end so you can keep track of the changes you make to it. If there is an alias section, then put it there.
– berkelem
Mar 27 at 11:00
1
You need to source the .bashrc file. Typesource ~/.bashrc
and you should be good to go.
– berkelem
Mar 27 at 11:03
And could you pls tell me where is that file? I kinda new on ubuntu
– Azazel
Mar 27 at 10:55
And could you pls tell me where is that file? I kinda new on ubuntu
– Azazel
Mar 27 at 10:55
Go to your home directory and type
ls -a
.– berkelem
Mar 27 at 10:56
Go to your home directory and type
ls -a
.– berkelem
Mar 27 at 10:56
Okey, and once inside that file, where should I type that? On the
more alias
section?– Azazel
Mar 27 at 10:59
Okey, and once inside that file, where should I type that? On the
more alias
section?– Azazel
Mar 27 at 10:59
Anywhere is fine, but best to put it on a newline at the end so you can keep track of the changes you make to it. If there is an alias section, then put it there.
– berkelem
Mar 27 at 11:00
Anywhere is fine, but best to put it on a newline at the end so you can keep track of the changes you make to it. If there is an alias section, then put it there.
– berkelem
Mar 27 at 11:00
1
1
You need to source the .bashrc file. Type
source ~/.bashrc
and you should be good to go.– berkelem
Mar 27 at 11:03
You need to source the .bashrc file. Type
source ~/.bashrc
and you should be good to go.– berkelem
Mar 27 at 11:03
|
show 4 more comments
To add Up , If the script wants to call the interpreter
- Make sure the first line of your file has #!/usr/bin/env python.
- Make it executable - chmod +x .py.
- And run it as ./.py
add a comment |
To add Up , If the script wants to call the interpreter
- Make sure the first line of your file has #!/usr/bin/env python.
- Make it executable - chmod +x .py.
- And run it as ./.py
add a comment |
To add Up , If the script wants to call the interpreter
- Make sure the first line of your file has #!/usr/bin/env python.
- Make it executable - chmod +x .py.
- And run it as ./.py
To add Up , If the script wants to call the interpreter
- Make sure the first line of your file has #!/usr/bin/env python.
- Make it executable - chmod +x .py.
- And run it as ./.py
answered Mar 27 at 10:57
redhatvickyredhatvicky
4242 silver badges5 bronze badges
4242 silver badges5 bronze badges
add a comment |
add a comment |