簡體   English   中英

如何從 WSL Z3D945423F8E9496C429A5D8C65B4604 啟動 Windows Anaconda python?

[英]How do I launch Windows Anaconda python from WSL Ubuntu?

我已經為Windows 10安裝了Anaconda。我后來在WSL下安裝了Ubuntu。 我想在 Ubuntu Z2591C98B70119FE5248Z98B1E4 中從 Anaconda 運行 python 這可能嗎? 如何激活環境?

或者,如果我在 ubuntu 下安裝 Anaconda,我可以在 Visual Studio 2019 中使用該環境嗎? (My end goal is to do my python dev in VS2019, be able to run in debug mode there, and also use the bash shell to run python scripts.)

您需要在 linux 分區上安裝anaconda

是的,您可以在VS2019上使用Ubuntu

下載-安裝

你可以在 Ubuntu 的 anaconda python 上使用 VS,但是你也需要在那里安裝它,而且目前微軟沒有對 wsl GUI 的官方支持,盡管你仍然可以安裝第三部分程序來為你做這件事。

為了在 wsl shell 下使用 Anaconda,您首先需要在那里安裝它。

您可以通過進入 anaconda 網頁並復制鏈接以下載最新的 linux 版本,並在 bash 下鍵入wget [link]來做到這一點。

下載完成后,您可以運行sudo bash [name of the archive]安裝它

您可以通過輸入ls找到它的名稱,它應該與您剛剛下載的版本匹配。

after that you should reload the bash source ~/.bashrc and you should now be able to use anaconda under the linux bash, though it's not possible yet to have it on the GUI.

There are multiple alternatives if you still want it displaying in your browser, you could either change the path to output in your windows browser, install a complete linux GUI or just use a windows software to display the anaconda GUI alone.

假設您想要后者:Go 到 MobaXterm 網站並下載它。 這是一款輕量級軟件,附帶各種內置工具,可訪問 SSH 服務器、VNC、SFTP、命令終端等。

  • 在系統上安裝 MobaXterm 后,打開它。

  • 單擊其菜單中給出的 Session 選項。

  • Select WSL 在工具菜單的末尾可用。

  • 從基本 WSL 設置中,單擊下拉框和 select Ubuntu 並按 OK 按鈕。

  • 現在您將在 MobaXterm 上看到您的 Ubuntu WSL 應用程序,非常棒。

  • 在那里,只需輸入: anaconda-navigator

  • 就是這樣,這將打開在 Windows 10 的 Ubuntu WSL 應用程序上運行的 Anaconda 的圖形用戶界面。

  • 直接從 Navigator 的 GUI 開始創建環境和安裝不同的包。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM