【发布时间】:2015-05-10 12:06:21
【问题描述】:
从 desctop 运行 sublime 时,它看不到我的 PERL5LIB 环境变量。 从终端运行它时 - 一切正常。 我在 .bashrc 和 .bash_profile 中设置了我的变量。
import os
>>> os.environ['SHELL']
'/bin/bash'
>>> os.environ['PERL5LIB']
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "./os.py", line 676, in __getitem__
KeyError: 'PERL5LIB'
这会给 linting 和构建系统带来麻烦 - 我无法链接和构建,因为 perl 看不到库。
如何修复环境变量?
【问题讨论】:
-
看起来更像 Python 而不是 Perl。你确定你在这里有正确的标签吗?
-
崇高使用phyton。我使用 phyton 命令 (CTRL+`) 来显示没有设置 PERL5LIB 变量