为什么以下 Jupytor Notebook 中的导入不起作用?

发布于 2025-01-11 21:51:45 字数 293 浏览 2 评论 0原文

所以我用了! sys 而不是直接使用“pip”。根据我的搜索,这应该是最佳实践。

但第二个单元格不打印任何内容。 我从这个网站得到了代码,它应该可以工作。但谁能告诉我为什么没有。 geekforgeek

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

寻找一个思念的角度 2025-01-18 21:51:46

-m 之间不应有空格:

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

否则破折号 - 将被视为“从 stdin< 读取输入” /code>”,我想。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文