# VS Code
# 一. 基本使用
占位内容
# 二. Issues
# 1. Ubuntu环境下VS Code无法使用中文输入;
# 参考链接:
https://www.zhihu.com/question/275664463/answer/406127910
# 问题原因:
从 Ubuntu Software Apps 安装的是 snap 软件包,也就是非 vscode 官方编译发布的安装包,存在题主所遇到的输入法bug,按 VSCode 官网下载步骤重新安装即可。
# 解决方法:
卸载重新安装,需要从官网重新下载软件:
https://code.visualstudio.com/docs/setup/linux
执行命令:
sudo apt install ./<file>.deb
# 2. VSCode配置Anaconda
报错信息:
[Running] python -u "c:\Users\lenovo\Desktop\imu_processing\test.py"
D:\Users\lenovo\anaconda3\lib\site-packages\numpy\__init__.py:143: UserWarning: mkl-service package failed to import, therefore Intel(R) MKL initialization ensuring its correct out-of-the box operation under condition when Gnu OpenMP had already been loaded by Python process is not assured. Please install mkl-service package, see http://github.com/IntelPython/mkl-service
from . import _distributor_init
Traceback (most recent call last):
File "D:\Users\lenovo\anaconda3\lib\site-packages\numpy\core\__init__.py", line 22, in <module>
from . import multiarray
File "D:\Users\lenovo\anaconda3\lib\site-packages\numpy\core\multiarray.py", line 12, in <module>
from . import overrides
File "D:\Users\lenovo\anaconda3\lib\site-packages\numpy\core\overrides.py", line 7, in <module>
from numpy.core._multiarray_umath import (
ImportError: DLL load failed while importing _multiarray_umath: �Ҳ���ָ����ģ�顣
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\Users\lenovo\Desktop\imu_processing\test.py", line 1, in <module>
import numpy as np
File "D:\Users\lenovo\anaconda3\lib\site-packages\numpy\__init__.py", line 145, in <module>
from . import core
File "D:\Users\lenovo\anaconda3\lib\site-packages\numpy\core\__init__.py", line 48, in <module>
raise ImportError(msg)
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:
\* The Python version is: Python3.8 from "D:\Users\lenovo\anaconda3\python.exe"
\* The NumPy version is: "1.20.1"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: DLL load failed while importing _multiarray_umath: �Ҳ���ָ����ģ�顣
目前VSCode不支持Anaconda插件了,需要手动安装,操作步骤如下:
在官网下载VScode( https://code.visualstudio.com/download)
进入Anaconda插件链接 https://marketplace.visualstudio.com/items?itemName=ms-python.anaconda-extension-pack 进行安装。
重启电脑。
# 3.解决下载慢的问题
参考:Vscode国内镜像下载方式 (opens new window)
https://vscode.cdn.azure.cn/stable/e7d7e9a9348e6a8cc8c03f877d39cb72e5dfb1ff/...
将下载前缀替换为vscode.cdn.azure.cn即可
← editor