Skip to content

win10下运行upload时,提示ModuleNotFoundError: No module named 'fcntl' #178

Closed

Description

@JoyQu

upload日志文件如下
Traceback (most recent call last):
File "H:\Programs\miniconda3\envs\bilive\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "H:\Programs\miniconda3\envs\bilive\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "I:\Software\bilive-main\src\upload\upload.py", line 11, in
import fcntl
ModuleNotFoundError: No module named 'fcntl'

当前使用git bash
python = 3.10.12

查询了一下,fcntl这个模块似乎不能支持windows,

pip install fcntl 也是无法安装
$ pip install fcntl
ERROR: Could not find a version that satisfies the requirement fcntl (from versi
ons: none)
ERROR: No matching distribution found for fcntl

大佬是否有替代方案呢?

Activity

  1. timerring commented on Mar 5, 2025

    @timerring
    Owner

    确实对于 windows 系统有这种情况,可以考虑使用 portalocker package 替换原有的 fcntl。 可以参考这个 issue jamesls/flask-shelve#2 (comment) 以及这个回答 https://stackoverflow.com/a/78447716/19513967 进行修改。

  2. self-assigned this
    on Mar 5, 2025
  3. JoyQu commented on Mar 6, 2025

    @JoyQu
    Author

    感谢,已完成修改,但目前还是有点问题

    1.电脑中存在GPU,但运行scan的时候还是会使用CPU执行,而非使用GPU(当前已下载small模型)
    MODEL_TYPE = "pipeline"
    Inference_Model = "small"
    AUTO_SLICE = True
    Your_API_KEY 已填写

    Image

    Image

    2.在运行scan.sh过程中,开始提示DanmakuFactory不可用(该文件似乎不能在win下运行),后重新下载了最新版本1.70 的 .exe 执行程序后,scan可正常运行
    但是burn.log中报错如下,这里是否需要指定版本的DanmakuFactory ?
    Image

    scan.log内容如下(这里似乎是拼接文件路径的时候多了个 '/' ?):

    Image

    最终导致处理的文件不存在,故upload找不到对应的文件就行上传

    Image

  4. changed the title [-]win10下运行upload时,提示ModuleNotFoundError: No module named 'fcntl'[/-] [+]运行scan时,是否需要指定DanmakuFactory 版本?[/+] on Mar 6, 2025
  5. changed the title [-]运行scan时,是否需要指定DanmakuFactory 版本?[/-] [+]运行burn时,是否需要指定DanmakuFactory 版本?[/+] on Mar 6, 2025
  6. timerring commented on Mar 7, 2025

    @timerring
    Owner

    好的,为了方便后面的用户搜索排查问题,我先把原来的 issue 标题改过来了。这个问题的话重新提一个 issue 吧,非常感谢。

    另外需要使用 GPU 的话,您需要设置 GPU_EXIST=False 为 True。

  7. changed the title [-]运行burn时,是否需要指定DanmakuFactory 版本?[/-] [+]win10下运行upload时,提示ModuleNotFoundError: No module named 'fcntl'[/+] on Mar 7, 2025
  8. JoyQu commented on Mar 7, 2025

    @JoyQu
    Author

    好的,已重新提交

  9. Repository owner locked and limited conversation to collaborators on May 1, 2025
  10. converted this issue into a discussion #319 on May 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions