简体   繁体   English

如何在 VS 代码服务器中为 python3.9 运行 pip?

[英]How to run pip for python3.9 in VS code server?

I have hosted a vs code server to run my python files but when I am doing pip it is showing bash: pip: command not found I wanted to know how can I install modules in the same server Thanks for your help I have hosted a vs code server to run my python files but when I am doing pip it is showing bash: pip: command not found I wanted to know how can I install modules in the same server Thanks for your help

I came across this while running code-server through coder.我在通过 coder 运行代码服务器时遇到了这个问题。 Was thrown off by the new environment, but the solution is actually fairly simple.被新环境甩了,但解决办法其实很简单。

  • Start by opening up a terminal (F1 > Terminal: Create New Terminal).首先打开一个终端(F1 > 终端:创建新终端)。
  • Type lsb_release -a .键入lsb_release -a If your environment is like mine, you'll see it's a standard Debian.如果你的环境和我的一样,你会看到它是标准的 Debian。 The pitfall here is that its apt sources haven't been updated.这里的陷阱是它的恰当来源尚未更新。
  • Type apt update to update the sources and get the packages.键入apt update以更新源并获取软件包。
  • Type apt install python3-pip键入apt install python3-pip

Hope this helps!希望这可以帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM