PYTHONPATH [英] PYTHONPATH
问题描述
我正在使用Linux env.I设置PYTHONPATH使用
import sys
sys.path。追加(----)
但我们关闭python并重新开始我没有在
PYTHONPATH中显示我的新条目。
任何人都可以帮助我让我的路径坚持下去吗?
谢谢
Hi,
I am using Linux env.I set the PYTHONPATH using
import sys
sys.path.append(----)
But we i close python and start again i is not showing my new entry in
PYTHONPATH.
Can anyone help me to make my path persistant?
Thanks
推荐答案
su ************** @ gmail.com 启发了我们with:
su**************@gmail.com enlightened us with:
我正在使用Linux env.I使用导入系统设置PYTHONPATH
导入sys
sys.path.append(----)
但我们关闭python并重新开始我没有在PYTHONPATH中显示我的新条目。
任何人都可以帮助我使我的路径坚持下去吗?
I am using Linux env.I set the PYTHONPATH using
import sys
sys.path.append(----)
But we i close python and start again i is not showing my new entry in
PYTHONPATH.
Can anyone help me to make my path persistant?
将以下内容添加到/ etc / profile:
export PYTHONPATH =" ..."
Sybren
-
世界的问题是愚蠢。并不是说应该对愚蠢的死刑进行处罚,但为什么我们不要仅仅拿掉
安全标签来解决问题呢? br />
Frank Zappa
Add the following to /etc/profile:
export PYTHONPATH="..."
Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don''t we just take the
safety labels off of everything and let the problem solve itself?
Frank Zappa
su ************** @ gmail.com 写道:
我正在使用Linux env.I设置PYTHONPATH使用
导入sys
sys.path.append(----)
这不会设置PYTHONPATH。
bruno @ bousin~ / public_html / aquitaine-pqa
Hi,
I am using Linux env.I set the PYTHONPATH using
import sys
sys.path.append(----)
This does not sets the PYTHONPATH.
bruno@bousin ~/public_html/aquitaine-pqa
python -h
(剪辑)
其他环境变量:
(剪辑)
PYTHONPATH:'':'' - 以
默认模块搜索为前缀的目录分隔列表路径。结果是sys.path。
(剪辑)
即:它是使用的PYTHONPATH环境变量 - 如果
定义 - 设置sys.path - 不是相反的方式
但我们关闭python并重新开始我没有在PYTHONPATH中显示我的新条目。
当然。
有谁能帮助我让我的路径坚持下去?
python -h
(snip)
Other environment variables:
(snip)
PYTHONPATH : '':''-separated list of directories prefixed to the
default module search path. The result is sys.path.
(snip)
That is : it''s the PYTHONPATH environnement variable that is used - if
defined - to set sys.path - not the other way round
But we i close python and start again i is not showing my new entry in
PYTHONPATH.
Of course.
Can anyone help me to make my path persistant?
Just与您系统上的任何其他环境变量一样。大多数
发行版,就像添加一行:
export PYTHONPATH =" / a / possible / path; / another / one; /和/ a /第三个
在/ etc / profile中(将是系统范围的默认值)或〜/ .bash_profile
(将是用户)特定的。
但这可能因你的发行版和你的外壳而异。
-
bruno desthuilliers
python -c" print''@''。join([''。''。join([w [:: - 1] for p in p.split(''。'')) ])
p in''o **** @ xiludom.gro''split(''@'')])"
Just like any other environnement variable on your system. With most
distros, it will be something like adding the line:
export PYTHONPATH="/a/possible/path;/another/one;/and/a/third"
either in /etc/profile (will be system-wide default) or ~/.bash_profile
(will be user-specific).
but this may vary according to your distro and your shell.
--
bruno desthuilliers
python -c "print ''@''.join([''.''.join([w[::-1] for w in p.split(''.'')]) for
p in ''o****@xiludom.gro''.split(''@'')])"
这篇关于PYTHONPATH的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!