我正在尝试按照以下描述使用 python3 制作 pip 可安装包:Url here
我使用 sudo python setup.py install
成功安装了我的包,但是 pip install mypackage
不起作用。那是因为我没有注册/上传我的包到 PyPI 吗? (因为这是我工作的内部项目,所以我不允许在 PyPI 中上传包。)
最佳答案
来自 pip's user guide :
pip supports installing from PyPI, version control, local projects, and directly from distribution files.
使用的命令行不同:
它们中的每一个都有一个合适的命令行使用,pip 会按以下顺序查找:
在查看要安装的项目时,pip 按以下顺序检查每个项目的类型:
- Project or archive URL.
- Local directory (which must contain a setup.py, or pip will report an error).
- Local file (a sdist or wheel format archive, following the naming conventions for those formats).
- A requirement, as specified in PEP 440.
对于您的具体问题,您无需上传到 PyPI。解决方案:
pip install http://intranet.url/mypackage-1.0.4.zip
关于python-3.x - 我可以在不在 pypi 中注册包的情况下制作 pip 可安装包吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48169424/