推荐学习书目
› 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
busuzhike
V2EX  ›  Python

Python 安装库,有办法完全自己手搓吗?就是不用 pip 什么的

  •  
  •   busuzhike · Dec 11, 2024 · 7900 views
    This topic created in 710 days ago, the information mentioned may be changed or developed.

    无正文

    16 replies  •  2024-12-20 08:39:47 +08:00
    dajj
    dajj
    Dec 11, 2024
    1
    pip 应该也是支持本地文件的
    Shorekeeper
    Shorekeeper
    Dec 11, 2024
    2
    在不需要考虑依赖关系和 build wheel 的前提下,解压到 site-packages 文件夹。
    ho121
    ho121
    Dec 11, 2024 via Android❤️2
    3
    您要找得是不是:PYTHONPATH
    ysc3839
    ysc3839
    Dec 11, 2024 via Android
    4
    setup.py ?不过这个也是依赖别的库的,不完全算是手搓。
    customsshen
    customsshen
    Dec 11, 2024
    5
    依赖是一切 install 的绊脚石,除非你能手搓依赖
    lpf0309
    lpf0309
    Dec 11, 2024
    6
    pip install xxx.whl?
    duanxianze
    duanxianze
    Dec 11, 2024
    7
    意思是像 c++那样手动下载源码手动引入?可以的吧
    haoyunyinglai
    haoyunyinglai
    Dec 11, 2024
    8
    下载源码 tar 包,然后 python setup.py install ?
    Hilalum
    Hilalum
    Dec 11, 2024
    9
    pip install ***.tar.gz
    fredsunme
    fredsunme
    Dec 11, 2024
    10
    你是不是在找 python venv 环境迁移?
    tomczhen
    tomczhen
    Dec 11, 2024
    11
    xy 问题
    busuzhike
    busuzhike
    OP
    Dec 11, 2024
    12
    @ysc3839 这个似乎是正解。

    另外,复各位,不能用 pip ,情况是这样的,本机有高版本的 py 了,但有一个软件内置了低版本的 py 而且没有 pip ,要做的是给低版本 py 安装库。
    houzhiqiang
    houzhiqiang
    Dec 12, 2024
    13
    python get-pip.py 或者安装一个其他的工具?比如 pdm ?

    https://pip.pypa.io/en/stable/installation/
    iorilu
    iorilu
    Dec 13, 2024
    14
    python 原生库都是 zip 包, 解包复制到 site-packages 不就行了

    除非是某些需要本地 c 库编译啥的, 那要编译好才复制
    frostming
    frostming
    Dec 19, 2024
    15
    有啊,这个 README 里列出了关键组件,你看着自己组装一下:

    https://github.com/frostming/unearth#why-this-project
    busuzhike
    busuzhike
    OP
    Dec 20, 2024
    16
    @frostming @houzhiqiang 感谢,我去了解一下。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1844 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 50ms · UTC 04:48 · PVG 12:48 · LAX 20:48 · JFK 23:48
    ♥ Do have faith in what you're doing.