V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
007yxc
V2EX  ›  Python

新手请教关于 pyproject.toml 的问题

  •  
  •   007yxc · Jul 29, 2023 · 2232 views
    This topic created in 1006 days ago, the information mentioned may be changed or developed.

    菜鸟在自学 Python ,Github 的开源学习项目,想在本地跑一下。

    安装包的时候一直会提示错误

    pip install -r requirements.txt
    

    错误提示如下

    Could not build wheels for lxml, Pillow, which is required to install pyproject.toml-based projects
    

    折腾了好久 pyproject.toml-based projects 该如何安装, 有相关资料可以参考吗?

    gitpushf
        1
    gitpushf  
       Jul 29, 2023
    看用的是 poetry 还是其他了,你直接把 Github 项目链接发出来不就有人回复你了
    julyclyde
        2
    julyclyde  
       Jul 29, 2023
    你先装个 wheel 再执行那个
    u823tg
        3
    u823tg  
       Jul 29, 2023
    不发项目没发看啊。 包管理都用的 pyproject.toml 你得确定是哪个。
    还有就是 windwos 下你得下载下 c++的工具链。 或者就得麻烦点找打包好的
    007yxc
        4
    007yxc  
    OP
       Jul 31, 2023
    007yxc
        5
    007yxc  
    OP
       Jul 31, 2023
    项目地址我发在上面啦
    @gitpushf
    u823tg
        6
    u823tg  
       Jul 31, 2023
    @007yxc #4 你运行 pip install lxml 可以装不,应该不行。 应该是没类似 windows 的 vc++那一套工具链。mac 下应该是 xcode 那一套。
    007yxc
        7
    007yxc  
    OP
       Jul 31, 2023
    @u823tg lxml 安装成功了。
    ```
    Using cached lxml-4.9.3-cp311-cp311-macosx_11_0_universal2.whl (8.6 MB)
    Installing collected packages: lxml
    Successfully installed lxml-4.9.3
    ```

    我网上也尝试找了虚拟环境搭建的文章看了,但还是失败,所以有点没头绪了。
    u823tg
        8
    u823tg  
       Aug 1, 2023
    @007yxc #7 那就是 Pillow pip install 下看报错什么。 我 Windows linux 都试了下就一个小问题 requests 依赖 urlib3 的版本问题。

    与虚拟环境没啥关系, 主要是 lxml 和 pillow 这类库有 c/c++代码 得要编译环境
    007yxc
        9
    007yxc  
    OP
       Aug 2, 2023
    @u823tg 单独安装 Pillow 也成功了,只是 pip install -r requirements.txt 时候 告知 lxml 和 pillow 失败。 我都打算放弃了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2730 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 13:03 · PVG 21:03 · LAX 06:03 · JFK 09:03
    ♥ Do have faith in what you're doing.