首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > perl python >

eclipse PYTHONPATH 引起 pypy 无法使用的有关问题

2013-07-24 
eclipse PYTHONPATH 引起 pypy 无法使用的问题程序使用 CPython 作为解析器,运行过程中有部分需要启动子进

eclipse PYTHONPATH 引起 pypy 无法使用的问题
程序使用 CPython 作为解析器,运行过程中有部分需要启动子进程 pypy 作为解释器

而eclipse中设置了 PYTHONPATH,于是eclipse让pypy也使用了CPython的PYTHONPATH,结果pypy运行出错

清空eclipse的PYTHONPATH后,pypy可以正常使用,但是eclipse的智能感知出问题了,出现了一大堆红波浪线


有什么解决方法吗? 
[解决办法]
Popen有env参数,文档如下:

If env is not None, it must be a mapping that defines the environment variables for the new process; these are used instead of inheriting the current process’ environment, which is the default behavior.

Note

If specified, env must provide any variables required for the program to execute. On Windows, in order to run a side-by-side assembly the specified env must include a valid SystemRoot.

热点排行