-2

enter image description here

So I used ! sys instead of use "pip" directly. From what I searched, this should be the best practice.

But the second cell doesn't print anything. I got the code from this web, it should work. But can anyone tell me why it didn't. geekforgeek

wangge
  • 145
  • 5
  • 1
    "*I got the code from this web, it should work.*" Not necessary. Internet is full of bad, broken code, sometimes deliberately evil. If you blindly copy code from the Net without understanding it sooner or later it will destroy your files. – phd Mar 03 '22 at 23:20
  • **DO NOT post images of code, data, error messages, etc.** - copy or type the text into the question. [ask] – Rob Mar 10 '22 at 02:20
  • I am not saying all things from Internet will work. Please don't over thinking those sentences. – wangge Mar 10 '22 at 15:09

1 Answers1

2

There shouldn't be a space between - and m:

python -m pip install thing
python - m pip install thing # NOT this

Otherwise the dash - will be treated as "read input from stdin", I presume.

ForceBru
  • 43,482
  • 10
  • 63
  • 98