Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Third-party module classes not detected when setting PYTHONPATH in a shell file

未关闭
#380 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
bash, javascript, python
领域
tooling

调研方向

首先使用提供的 run.sh 重现缺失的 GAMS 类检测,并比较 package 版本 1.9.3 和 1.9.4。跟踪 package 如何调用配置的 Python 路径以及读取 PYTHONPATH。使用 run.sh 时能够再次检测到 gams 模块中的类,即表示完成。

由索引模型根据 Issue 内容生成。

描述

good first issue

I've defined a shell script inside the root of my project, called run.sh. What it does is, adds two paths relating to a third-party module (GAMS Python API), to PYTHONPATH environment variable, and then calls python with all arguments given to the script:

#!/bin/bash

export PYTHONPATH=/opt/gams/gams34.3_linux_x64_64_sfx/apifiles/Python/api_39/:"$PYTHONPATH"
export PYTHONPATH=/opt/gams/gams34.3_linux_x64_64_sfx/apifiles/Python/gams/:"$PYTHONPATH"
export PYTHONPATH="$(pwd)":"$PYTHONPATH"

python3 $@

In the package settings, I've configured the python path to ./run.sh, for the script to be called and the module being detected by the package.

However, after updating the package version to 1.9.4, it no longer detects the classes inside the gams module:

Screenshot from 2021-08-05 14-16-19

Note that, the script works perfectly with 1.9.3. I downgraded the package and then upgraded it, and it seems it is reproducable for me.

(I don't think the system specs are needed, as I just mentioned, the issue is new in 1.9.4, with exact set of packages and Atom version)

主要语言
JavaScript
星标
238
派生
41
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

atom-community/ide-python 的其他 Issue

查看 atom-community/ide-python 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。