Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

python executable not detected outside of pipenv project

未關閉
#218 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
35/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
javascript, python
領域
devtools

研究方向

此 issue 涉及可執行檔設定與 Pipenv 整合;先追蹤不存在 Pipenv 專案時 $PIPENV_PATH 的展開方式。將回報的 pipenv --venv 行為與 pipenv --py 進行比較,接著驗證預設的 python 在 Pipenv 專案內外都能正常運作。

由索引模型根據 Issue 內容生成。

描述

My system python is installed via homebrew/miniconda:

$ which python
/usr/local/Caskroom/miniconda/base/bin/python

When the python executable setting is left as default python PyLS spins up from the base environment fine.

If I set up a project with pipenv and use the suggested $PIPENV_PATH/bin/python then it spins up PyLS in the virtual environment and works fine for that project. However, outside of the project the python executable cannot be found.

From reviewing the code it looks like outside of a pipenv project the python path becomes /bin/python which is not where my system python lives. It needs to fallback to just python.


I can see that $PIPENV_PATH gets replaced with the output of pipenv --venv, however you could use pipenv --py to get the full path to the interpreter (or just append /bin/python as it's always that). In that case the executable setting won't be needed for pipenv, so it can just remain as the default python or be set as an absolute path if needed.


N.B As a workaround I tried to symlink /bin/python to my miniconda python. However on MacOS SIP prevents this. I'd rather not have to disable it.

主要語言
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 摘要。