Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EC2 python: can't open file '–m': [Errno 2] No such file or directory

I am trying to run command python –m . but I am getting error as

python: can't open file '–m': [Errno 2] No such file or directory

I am on Ec2 the python version is 2.7

like image 669
Stacy Thompson Avatar asked Mar 06 '23 02:03

Stacy Thompson


1 Answers

As suggested by @duskwuff, you are using the unicode char en dash instead of hyphen -. Though they look same, they are different chars. Use hyphen instead of en dash.

$ –
-bash: $'\342\200\223': command not found

$ python –m
python: can't open file '–m': [Errno 2] No such file or directory

$ -
-bash: -: command not found

$ python -m
Argument expected for the -m option
usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
like image 181
helloV Avatar answered Apr 28 '23 15:04

helloV