ubuntu - 如何在 Windows 子系统 Linux Ubuntu 上安装 Pycharm

标签 ubuntu pycharm windows-subsystem-for-linux

在 Windows 子系统 Linux 中,可以使用 sudo snap install pycharm-professional --classic --edge 轻松安装 Pycharm ,并且安装会自动为 Pycharm 创建桌面快捷方式。
因为,我通过 RDP 将 WSL 与桌面环境一起使用,所以通过 snap 安装要求我在 PowerShell for Linux 中插入前两行。

sudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target
exec sudo nsenter -t $(pidof systemd) -a su - $LOGNAME
sudo /etc/init.d/xrdp start
因此,我正在寻找一种不需要包含前两行的安装方法,但仍然能够提供 desktop捷径。

最佳答案

这可以通过以下步骤来实现。
1.下载安装文件:https://www.jetbrains.com/pycharm/download/other.html .
-在这里,我使用 firefox在wsl中下载文件。
2.在 WSL-Ubuntu 中,pycharm-professional-2021.1.3.tar.gzdownloads 中可见文件夹,一旦下载完成。
enter image description here
3.提取tar.gz文件使用 Archive Manager enter image description here
enter image description here

  • 将您下载的 PyCharm 分发存档解压缩到您希望安装程序的位置。我们将此位置称为您的 {installation home}。

  • enter image description here .
  • 要启动应用程序,请转到“{installation home}/bin”,或者直接打开控制台,cd 进入“{installation home}/bin”并输入:
    ./pycharm.sh

  • 这将初始化配置目录中的各种配置文件:
    ~/.config/JetBrains/PyCharm2021.1。
  • 一旦Pycharm开始,前往Tools - Create Desktop Entry..

  • enter image description here
  • 一个 Create Desktop Entry会弹出。对于我的情况,我离开了 Create the entry for all users (....)保持取消勾选。这是因为,每当我勾选它时都会出错。

  • enter image description here
  • 在步骤 7 上单击确定后,Pycharm 屏幕右下角会弹出成功按钮。

  • enter image description here
  • 退出 Pycharm,应该可以看到桌面快捷方式

  • enter image description here

    关于ubuntu - 如何在 Windows 子系统 Linux Ubuntu 上安装 Pycharm,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68930962/

    相关文章:

    python - 有人有 "dark"PyCharm 模式文件吗?

    python - 如何在 PyCharm 中拥有单独的输出窗口?

    mongodb - 无法更改 mongodb 的 dbpath

    windows-subsystem-for-linux - ConEmu 停止在 Windows 上使用 Bash

    ubuntu - 为什么在 WSL 中使用 RAPIDS 时出现 CUDA 内存错误?

    gcc - 在 ubuntu 中安装 gcc 更新版本 4.6

    javascript - 在 JavaScript 中删除多行

    python - 在函数末尾设置调试器断点而不返回

    python - 在 Ubuntu 服务器上运行 python 时无法在 .txt 中获取新行

    android - ioctl LOOP_SET_FD 失败