sheldonxxd / obsidian_vault_template_for_researcher

This is an vault template for researchers using obsidian.
GNU General Public License v3.0
1.09k stars 177 forks source link

草稿归档的Python路径问题 #56

Closed Bartonzany closed 2 years ago

Bartonzany commented 2 years ago

ISSUE TEMPLATE

In order to solve the problem more efficiently, please submit the issue according to this template.

Environment

  1. Vault template release version: v1.8
  2. Operating system: windows
  3. Python version: 3.9.12 (anaconda)
  4. Zotero version: 6.0
  5. Pandoc version: 2.12
  6. Obsidian version: 1.0.0

Bug descryption

点击QuickAdd中设置的草稿归档按钮,无法进行归档操作,原因是没有设置安装的Anaconda的环境变量

Obsidian console information

使用Ctrl+Shift+i打开console控制台,结果显示如下:

image

Bartonzany commented 2 years ago

将问题进行分析,发现是在问题 Error: spawn ‪D:\Anaconda3\python.exe ENOENT 中,提示没有找到Python编译器的环境变量

使用Python脚本进行测试:

import sys, platform
import os

print('system:', platform.platform())
print('python_version:', sys.version_info)
print(sys.path)
print(os.path.dirname(os.path.__file__))

显示的Python编译器路径如下:

image

将路径D:\Anaconda3 复制到环境变量中(注意不要复制成D:\Anaconda3\,去掉“\”斜杠

Win10系统中右键“此电脑”->“属性”->“高级系统设置”->“环境变量”,找到”Path“ image

image

image

添加复制的编译器位置到环境变量中,"编辑"->"新建",上下两个都要:

image

重启一下Obsidian,问题解决