Skip to content

Commit ae0d8ac

Browse files
committed
fix ubuntu 22.04 env bug
1 parent 80f3fac commit ae0d8ac

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

tools/env_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ def install_pyncnn():
310310

311311
# install
312312
os.chdir(ncnn_dir)
313-
command(f'cd python && {pip} install -e .' + pip_mirror)
313+
command(f'cd python && {pip} install ncnn' + pip_mirror)
314314

315315
path_ls = []
316316
path_ls.append(osp.join(ncnn_dir, 'build', 'tools', 'onnx'))

tools/ubuntu_utils.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def ensure_base_env(work_dir, dep_dir):
8787

8888
#dep
8989
os.system(
90-
f"{sudo} apt-get install cmake curl wget git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev -y"
90+
f"{sudo} apt-get install cmake curl wget git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev python3-dev -y"
9191
)
9292

9393
# check ubuntu
@@ -155,20 +155,20 @@ def ensure_base_env(work_dir, dep_dir):
155155
# check torch and mmcv, we try to install mmcv, it is not compulsory
156156
mmcv_version = None
157157
torch_version = None
158-
try:
159-
import torch
160-
torch_version = torch.__version__
161-
162-
try:
163-
import mmcv
164-
mmcv_version = mmcv.__version__
165-
except Exception:
166-
# install mmcv
167-
print('mmcv not found, try install mmcv ..', end='')
168-
os.system('python3 -m pip install -U openmim')
169-
os.system('mim install mmcv-full==1.5.1')
170-
except Exception:
171-
pass
158+
# try:
159+
# import torch
160+
# torch_version = torch.__version__
161+
162+
# try:
163+
# import mmcv
164+
# mmcv_version = mmcv.__version__
165+
# except Exception:
166+
# # install mmcv
167+
# print('mmcv not found, try install mmcv ..', end='')
168+
# os.system('python3 -m pip install -U openmim')
169+
# os.system('mim install mmcv-full==1.5.1')
170+
# except Exception:
171+
# pass
172172

173173
# git
174174
git = simple_check_install('git', sudo)

0 commit comments

Comments
 (0)