NanmiCoder / NanmiCoder/MediaCrawler

[BUG] 嵌套的 venv 环境会导致 uv 无法寻找到已安装的 python

Open
#673 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
65.3k
Forks
12.6k
PR merge metrics
No merged PRs in 30d

Description

🔍 问题检查清单

  • 我已经仔细阅读了项目使用过程中的常见问题汇总
  • 我已经搜索并查看了已关闭的issues
  • 我确认这不是由于滑块验证码、Cookie过期、Cookie提取错误、平台风控等常见原因导致的问题

🐛 问题描述

如果 MediaCrawler 下载到另一个带有 venv 环境的文件夹里 ,uv 可能会无法定位到已安装的 python

https://github.com/astral-sh/uv/issues/7562
https://github.com/astral-sh/uv/issues/7604

尝试删除掉 .python-version 文件 问题得以解决

📝 复现步骤

💻 运行环境

  • 操作系统: MacOS
  • Python版本: 3.9
  • 是否使用IP代理: 否
  • 是否使用VPN翻墙软件:否
  • 目标平台(抖音/小红书/微博等): 多平台

📋 错误日志

$ uv sync        
pyenv: version `3.9' is not installed (set by /Users/<user>/<dev_path>/MediaCrawler/.python-version)

📷 错误截图

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the nested-venv case with uv sync and the repository’s .python-version file, using the macOS and Python 3.9 details in the report. Compare the behavior with .python-version removed and consult the linked uv issues; done means the project’s Python environment is located correctly without requiring users to delete the file.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.