V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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 · 273 天前 · 994 次点击
    这是一个创建于 273 天前的主题,其中的信息可能已经有所发展或是发生改变。

    菜鸟在自学 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  
       272 天前
    看用的是 poetry 还是其他了,你直接把 Github 项目链接发出来不就有人回复你了
    julyclyde
        2
    julyclyde  
       272 天前
    你先装个 wheel 再执行那个
    u823tg
        3
    u823tg  
       272 天前
    不发项目没发看啊。 包管理都用的 pyproject.toml 你得确定是哪个。
    还有就是 windwos 下你得下载下 c++的工具链。 或者就得麻烦点找打包好的
    007yxc
        4
    007yxc  
    OP
       271 天前
    007yxc
        5
    007yxc  
    OP
       271 天前
    项目地址我发在上面啦
    @gitpushf
    u823tg
        6
    u823tg  
       271 天前
    @007yxc #4 你运行 pip install lxml 可以装不,应该不行。 应该是没类似 windows 的 vc++那一套工具链。mac 下应该是 xcode 那一套。
    007yxc
        7
    007yxc  
    OP
       270 天前
    @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  
       270 天前
    @007yxc #7 那就是 Pillow pip install 下看报错什么。 我 Windows linux 都试了下就一个小问题 requests 依赖 urlib3 的版本问题。

    与虚拟环境没啥关系, 主要是 lxml 和 pillow 这类库有 c/c++代码 得要编译环境
    007yxc
        9
    007yxc  
    OP
       269 天前
    @u823tg 单独安装 Pillow 也成功了,只是 pip install -r requirements.txt 时候 告知 lxml 和 pillow 失败。 我都打算放弃了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2739 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 10:28 · PVG 18:28 · LAX 03:28 · JFK 06:28
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.