pip安装GitHub上的库
Whisper Lv5

pip安装某个项目

1
pipenv install git+https://github.com/bluejeans/api-rest-meetings.git@pip-repo#egg=BlueJeansMeetingsRestApi

egg名称是setup.py中的name

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# coding: utf-8

from setuptools import setup, find_packages

NAME = "BlueJeansMeetingsRestApi"
VERSION = "1.0.4402212019"

# To install the library, run the following
# python setup.py install
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil"]

setup(
name=NAME,
version=VERSION,
description="BlueJeans Meetings REST API",
author_email="glenn@bluejeans.com",
url="",
keywords=["Swagger", "BlueJeans Meetings REST API"],
install_requires=REQUIRES,
packages=find_packages(),
include_package_data=True,
long_description="xxx"
)

egg: set中name名称

参考:https://docs.python.org/zh-cn/3/distutils/setupscript.html

使用

导入时是使用的项目(my-coomon-code)下面的包名(fileconvert)

1
2
3
4
5
6
G:\pythonPros\my-common-code> tree
├─.idea
│ └─inspectionProfiles
└─fileconvert
└──__init__.py
└──htmlToPdf.py

其他项目安装

1
pipenv install git+https://gitee.com/tina-aa/my-common-code.git#egg=my-common-code

导入其他项目:

1
from fileconvert import htmlToPdf