目录
1 VMware开启虚拟机失败,模块“Disk”启动失败
2 vim 输入时光标键会变成a,b,c,d
3 vim中delete(backspace)键不能向左删除
4 conda: command not found解决办法
5 进入jupyter notebook 的时候,会提示有密码问题
6 jupyter 报错:ImportError: cannot import name 'ensure_async' from 'jupyter_core.utils'
报错误:另一个程序已锁定文件的一部分,进程无法访问,模块“Disk”启动失败。未能启动虚拟机。
报错:
今天打开虚拟机发现打开失败,报错误如下:
另一个程序已锁定文件的一部分,进程无法访问
打不开磁盘“D:\ubuntu2004VM\Ubuntu 64 位.vmdk”或它所依赖的某个快照磁盘。
模块“Disk”启动失败。
未能启动虚拟机。
解决方案:
到上图提示的文件路径下,
删除所有的 .lck 文件夹;
然后再次启动虚拟机
成功!
解决办法:
echo "set nocp" >> ~/.vimrc
source ~/.vimrc
卸载重装
sudo apt-get remove vim-common
sudo apt-get install vim
解决了~
在ubuntu上安装了 Anaconda 之后,使用 conda list 看安装哪些包
结果显示 command not found
解决方法:
vim ~/.bashrc
加上 export PATH=$PATH:【自己的安装目录】
对于我就是:
export PATH=$PATH:/home/rookie/anaconda3/bin
然后保存更改,再次运行
source ~/.bashrc
然后再次使用,发现成功的
conda list
问题:
命令行输入
jupyter notebook
浏览器使用 http://localhost:8888/tree
刚开始进入jupyter notebook 的时候,会提示有密码问题
这是我们需要设置一下密码,然后重启 jupyter notebook
解决方法:
步骤:
jupyter notebook --generate-config
(ai) (base) root@ubuntu:/home/rookie# jupyter notebook --generate-config
Writing default config to: /root/.jupyter/jupyter_notebook_config.py
(ai) (base) root@ubuntu:/home/rookie# vi /root/.jupyter/jupyter_notebook_config.py
找到 c.NotebookApp.allow_password_change=False
PS:vim 模式 使用 /allow_password_change 进行查找
jupyter notebook password
vi /root/.jupyter/jupyter_notebook_config.py
找到,c.NotebookApp.password = 'xxxxxx' 设置即可
jupyter notebook
然后浏览器再次输入
http://localhost:8888/tree
输入刚才设置的密码
成功进入
执行命令启动jupyter
jupyter notebook
有报错
ImportError: cannot import name 'ensure_async' from 'jupyter_core.utils'
看最后几行
rookie@ubuntu:~$ jupyter notebook
Traceback (most recent call last):
File "/home/rookie/.local/bin/jupyter-notebook", line 5, in
from notebook.notebookapp import main
File "/home/rookie/.local/lib/python3.8/site-packages/notebook/notebookapp.py", line 78, in
from .services.kernels.kernelmanager import MappingKernelManager, AsyncMappingKernelManager
File "/home/rookie/.local/lib/python3.8/site-packages/notebook/services/kernels/kernelmanager.py", line 18, in
from jupyter_client.session import Session
File "/home/rookie/.local/lib/python3.8/site-packages/jupyter_client/__init__.py", line 3, in
from .asynchronous import AsyncKernelClient
File "/home/rookie/.local/lib/python3.8/site-packages/jupyter_client/asynchronous/__init__.py", line 1, in
from .client import AsyncKernelClient # noqa
File "/home/rookie/.local/lib/python3.8/site-packages/jupyter_client/asynchronous/client.py", line 8, in
from ..channels import AsyncZMQSocketChannel, HBChannel
File "/home/rookie/.local/lib/python3.8/site-packages/jupyter_client/channels.py", line 12, in
from jupyter_core.utils import ensure_async
ImportError: cannot import name 'ensure_async' from 'jupyter_core.utils' (/usr/lib/python3/dist-packages/jupyter_core/utils/__init__.py)
rookie@ubuntu:~$
解决方法:升级 jupyter
pip install --upgrade jupyter
升级jupyter_core和jupyter_client
pip install --upgrade jupyter_core jupyter_client
成功!
待更新~~