我想在 WSL 2 中运行的 VS Code 中使用 Jupyter Notebook。常规 Python 在 WSL 中工作没有问题,这意味着基本 conda 环境已连接,我可以运行 .py 文件。此外,I\xe2\x80\x99m 能够运行该命令,jupyter notebook该命令将在 WSL 中启动笔记本服务器,从而将本地主机暴露给 Windows 系统。
但是,我想在 VS Code 中测试新的 Jupyter Notebook 功能,这对我来说不起作用;VS Code 显示:Jupyter Server: No Kernel和Python: Not Started(参见下面的屏幕截图)。
我的测试机是:
\n\n我做了什么:
\n\ncode .)python visual-studio-code jupyter-notebook windows-subsystem-for-linux pengwin
I have created a WSL (version 1) Ubuntu 20.04 distro which I have exported, as a backup. I have made some changes to the original distro and want to revert back to export.
The original distro install is called: Ubuntu-20.04
wsl --list
Run Code Online (Sandbox Code Playgroud)
Output:
Windows Subsystem for Linux Distributions:
Ubuntu-20.04 (Default)
Run Code Online (Sandbox Code Playgroud)
The installation folder for Ubuntu is the default folder from installation:
C:\Users\<my user name>\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04onWindows_xxxxx
Run Code Online (Sandbox Code Playgroud)
(I've changed the user name and UID)
I've looked at the import and export options and …
我的设置如下所示:Windows 10, Release 1909 (Build 18363.1082),在 Ubuntu 20.04 环境中使用 WSL2。大多数时候一切都很好,但有些问题我无法解决。
在使用parcel(React bundler) 进行开发期间,我遇到了 bundler 显然同时打开大量文件的问题,并且在某个时候,我遇到了以下问题:
EMFILE: too many open files, open '/home/myusername/Projects/some-project-path/node_modules/@material-ui/icons/esm/RoundedCornerRounded.js'
Run Code Online (Sandbox Code Playgroud)
由于parcel看似不容易支持使用类似的东西graceful-fs,我试图增加在 Ubuntu 环境中打开文件的限制。到目前为止我尝试过的:
ulimit -n 4096(默认情况下是最高的),但显然(到目前为止?)还不够fs.files-max非常高的值/etc/sysctl.conf,但它似乎没有效果(无论sysctl -p是在 重启之后还是重启之后wsl)fs.inotify.max_user_watches,但这似乎也没有效果/etc/security/limits.conf似乎没有效果DefaultLimitNOFILE中/etc/systemd/system.conf可以有效果(所以我这样做,以及)有没有人设法在 WSL2 上的 Ubuntu 20.04 上解决类似的系统?这让我很困惑,它阻止我parcel在这个环境中使用。这真的很遗憾,因为其他一切都运行良好。
所以我发现我在不同地方(可能是/etc/security/limits.conf)的变化产生了某种影响。只是在直接登录时不会。这说明了这一点:
donmartin@SOMEMACHINE:~$ ulimit -Hn
4096
donmartin@SOMEMACHINE:~$ su donmartin
Password: …Run Code Online (Sandbox Code Playgroud) 我已经尝试过,但每次重新启动系统时,我的变量都会消失。
如何在 Ubuntu WSL2 上永久存储环境变量?
ubuntu environment-variables windows-subsystem-for-linux wsl-2
在我的 Windows 目录中
C:\Users\jholmes\pichak\analytics
Run Code Online (Sandbox Code Playgroud)
我有 run1.ps1 代码。我运行 wsl.exe,现在我的密码是
/mnt/c/WINDOWS/system32
Run Code Online (Sandbox Code Playgroud)
如何指向第一个路径并执行脚本?
我试图在WSL上使用OpenAI的着名"Gym"模块,并在python 3.5.2上执行代码.当我尝试运行这里解释的环境时,使用代码:
import gym
env = gym.make('CartPole-v0')
for i_episode in range(20):
observation = env.reset()
for t in range(100):
env.render()
print(observation)
action = env.action_space.sample()
observation, reward, done, info = env.step(action)
if done:
print("Episode finished after {} timesteps".format(t+1))
break
Run Code Online (Sandbox Code Playgroud)
有时候是这样的 :
Traceback (most recent call last):
File "<stdin>", line 4, in <module>
File "/home/DrHofstadter/gym/gym/core.py", line 153, in render
return self._render(mode=mode, close=close)
File "/home/DrHofstadter/gym/gym/core.py", line 285, in _render
return self.env.render(mode, close)
File "/home/DrHofstadter/gym/gym/core.py", line 153, in render
return self._render(mode=mode, close=close)
File …Run Code Online (Sandbox Code Playgroud) python nameerror python-3.x windows-subsystem-for-linux openai-gym
我正在尝试在Windows子系统Linux上运行maven,并获得"无法分配内存"错误.但是,free -m表明我有足够的可用内存,并且Cygwin上的相同构建成功.
有人有任何处理这个的提示吗?我更喜欢在我的pom.xml上更改我的settings.xml,但我几乎可以接受任何内容.
我使用本指南。当我执行“添加源代码文件”步骤时,会看到以下报告:
Unable to write file 'vscode-remote://wsl+ubuntu-20.04/home/alex/TEST/helloworld/helloworld' (NoPermissions (FileSystemError): Error: EACCES: permission denied, open '/home/alex/TEST/helloworld/helloworld')
Run Code Online (Sandbox Code Playgroud)
我不知道该怎么办,有人可以帮助我吗?
我在我的Windows 机器上运行本地AEM 服务器。服务器在localhost:4502上运行。我正在使用在 WSL2 中运行的 Ubuntu 发行版进行开发。我想在我的WSL2 Ubuntu 中访问在 Windows 机器上运行的 localhost:4502 。
有什么办法可以做到这一点还是不可能?
windows portforwarding aem windows-subsystem-for-linux wsl-2
windows-subsystem-for-linux ×10
wsl-2 ×3
python ×2
windows ×2
aem ×1
maven ×1
nameerror ×1
openai-gym ×1
parceljs ×1
pengwin ×1
python-3.x ×1
ubuntu ×1
ulimit ×1
windows-10 ×1