Skip to content

Commit b535906

Browse files
committed
- 修复包依赖。
v1.4.4通过pip安装时,不会自动安装依赖包。
1 parent 1beccbc commit b535906

File tree

1 file changed

+21
-14
lines changed

1 file changed

+21
-14
lines changed

setup.py

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,6 @@ def get_version():
1515
FileExistsError('ISAT/__init__.py not exists.')
1616

1717

18-
def get_install_requires():
19-
requirements_file = 'requirements.txt'
20-
requirements_list = []
21-
if os.path.exists(requirements_file):
22-
with open(requirements_file) as f:
23-
lines = f.readlines()
24-
for line in lines:
25-
line = line.rstrip('\n')
26-
if line != '':
27-
requirements_list.append(line)
28-
return requirements_list
29-
30-
3118
setup(
3219
name="isat-sam", # 包名
3320
version=get_version(), # 版本号
@@ -46,7 +33,27 @@ def get_install_requires():
4633
include_package_data=True,
4734

4835
python_requires=">=3.8", # python 版本要求
49-
install_requires=get_install_requires(),
36+
install_requires=[ # 必须直接指明,不然pip包不会自动安装
37+
'imgviz',
38+
'scikit-image',
39+
'numpy',
40+
'opencv_python_headless',
41+
'pillow',
42+
'pyqt5',
43+
'pyyaml',
44+
'torch>=2.1.1',
45+
'torchvision',
46+
'pycocotools',
47+
'timm',
48+
'shapely',
49+
'hydra-core>=1.3.2',
50+
'tqdm>=4.66.1',
51+
'fuzzywuzzy',
52+
'python-Levenshtein',
53+
'iopath',
54+
'orjson',
55+
'pydicom'
56+
],
5057

5158
classifiers=[
5259
"Intended Audience :: Developers", # 目标用户:开发者

0 commit comments

Comments
 (0)