Skip to content

Commit

Permalink
Merge pull request #2611 from k-okada/cupy_check
Browse files Browse the repository at this point in the history
if we install cupy with pip install cupy, instead of pip install  cupy-cudaXXX, the package name is cupy
  • Loading branch information
k-okada authored Jul 11, 2021
2 parents 728831b + 7bd7981 commit 663532b
Showing 18 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion jsk_perception/node_scripts/alexnet_object_recognition.py
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
c.f https://github.com/jsk-ros-pkg/jsk_recognition/pull/2485
''', file=sys.stderr)
sys.exit(1)
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name ] == []:
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name or "cupy" == p.project_name ] == []:
print('''Please install CuPy
sudo pip install cupy-cuda[your cuda version]
2 changes: 1 addition & 1 deletion jsk_perception/node_scripts/deep_sort/deep_sort_tracker.py
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
c.f https://github.com/jsk-ros-pkg/jsk_recognition/pull/2485
''', file=sys.stderr)
sys.exit(1)
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name ] == []:
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name or "cupy" == p.project_name ] == []:
print('''Please install CuPy
sudo pip install cupy-cuda[your cuda version]
2 changes: 1 addition & 1 deletion jsk_perception/node_scripts/deep_sort_tracker_node.py
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
c.f https://github.com/jsk-ros-pkg/jsk_recognition/pull/2485
''', file=sys.stderr)
sys.exit(1)
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name ] == []:
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name or "cupy" == p.project_name ] == []:
print('''Please install CuPy
sudo pip install cupy-cuda[your cuda version]
2 changes: 1 addition & 1 deletion jsk_perception/node_scripts/face_pose_estimation.py
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@
c.f https://github.com/jsk-ros-pkg/jsk_recognition/pull/2485
''', file=sys.stderr)
sys.exit(1)
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name ] == []:
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name or "cupy" == p.project_name ] == []:
print('''Please install CuPy
sudo pip install cupy-cuda[your cuda version]
2 changes: 1 addition & 1 deletion jsk_perception/node_scripts/fast_rcnn.py
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@
c.f https://github.com/jsk-ros-pkg/jsk_recognition/pull/2485
''', file=sys.stderr)
sys.exit(1)
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name] == []:
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name or "cupy" == p.project_name] == []:
print('''Please install CuPy
sudo pip install cupy-cuda[your cuda version]
2 changes: 1 addition & 1 deletion jsk_perception/node_scripts/fcn_depth_prediction.py
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@
c.f https://github.com/jsk-ros-pkg/jsk_recognition/pull/2485
''', file=sys.stderr)
sys.exit(1)
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name ] == []:
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name or "cupy" == p.project_name ] == []:
print('''Please install CuPy
sudo pip install cupy-cuda[your cuda version]
2 changes: 1 addition & 1 deletion jsk_perception/node_scripts/fcn_object_segmentation.py
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@
c.f https://github.com/jsk-ros-pkg/jsk_recognition/pull/2485
''', file=sys.stderr)
sys.exit(1)
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name ] == []:
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name or "cupy" == p.project_name ] == []:
print('''Please install CuPy
sudo pip install cupy-cuda[your cuda version]
2 changes: 1 addition & 1 deletion jsk_perception/node_scripts/hmr/net.py
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
c.f https://github.com/jsk-ros-pkg/jsk_recognition/pull/2485
''', file=sys.stderr)
sys.exit(1)
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name ] == []:
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name or "cupy" == p.project_name ] == []:
print('''Please install CuPy
sudo pip install cupy-cuda[your cuda version]
2 changes: 1 addition & 1 deletion jsk_perception/node_scripts/hmr/resnet_v2_50.py
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
c.f https://github.com/jsk-ros-pkg/jsk_recognition/pull/2485
''', file=sys.stderr)
sys.exit(1)
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name ] == []:
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name or "cupy" == p.project_name ] == []:
print('''Please install CuPy
sudo pip install cupy-cuda[your cuda version]
2 changes: 1 addition & 1 deletion jsk_perception/node_scripts/hmr/smpl.py
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
c.f https://github.com/jsk-ros-pkg/jsk_recognition/pull/2485
''', file=sys.stderr)
sys.exit(1)
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name ] == []:
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name or "cupy" == p.project_name ] == []:
print('''Please install CuPy
sudo pip install cupy-cuda[your cuda version]
2 changes: 1 addition & 1 deletion jsk_perception/node_scripts/human_mesh_recovery.py
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
c.f https://github.com/jsk-ros-pkg/jsk_recognition/pull/2485
''', file=sys.stderr)
sys.exit(1)
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name ] == []:
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name or "cupy" == p.project_name ] == []:
print('''Please install CuPy
sudo pip install cupy-cuda[your cuda version]
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@
c.f https://github.com/jsk-ros-pkg/jsk_recognition/pull/2485
''', file=sys.stderr)
sys.exit(1)
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name ] == []:
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name or "cupy" == p.project_name ] == []:
print('''Please install CuPy
sudo pip install cupy-cuda[your cuda version]
2 changes: 1 addition & 1 deletion jsk_perception/node_scripts/openpose/hand_net.py
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
c.f https://github.com/jsk-ros-pkg/jsk_recognition/pull/2485
''', file=sys.stderr)
sys.exit(1)
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name ] == []:
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name or "cupy" == p.project_name ] == []:
print('''Please install CuPy
sudo pip install cupy-cuda[your cuda version]
2 changes: 1 addition & 1 deletion jsk_perception/node_scripts/openpose/pose_net.py
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
c.f https://github.com/jsk-ros-pkg/jsk_recognition/pull/2485
''', file=sys.stderr)
sys.exit(1)
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name ] == []:
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name or "cupy" == p.project_name ] == []:
print('''Please install CuPy
sudo pip install cupy-cuda[your cuda version]
4 changes: 2 additions & 2 deletions jsk_perception/node_scripts/people_pose_estimation_2d.py
Original file line number Diff line number Diff line change
@@ -18,15 +18,15 @@
c.f https://github.com/jsk-ros-pkg/jsk_recognition/pull/2485
''', file=sys.stderr)
sys.exit(1)
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name ] == []:
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name or "cupy" == p.project_name ] == []:
print('''Please install CuPy
sudo pip install cupy-cuda[your cuda version]
i.e.
sudo pip install cupy-cuda91
''', file=sys.stderr)
sys.exit(1)
# sys.exit(1)
import chainer
import chainer.functions as F
from chainer import cuda
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
c.f https://github.com/jsk-ros-pkg/jsk_recognition/pull/2485
''', file=sys.stderr)
sys.exit(1)
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name ] == []:
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name or "cupy" == p.project_name ] == []:
print('''Please install CuPy
sudo pip install cupy-cuda[your cuda version]
2 changes: 1 addition & 1 deletion jsk_perception/node_scripts/ssd_object_detector.py
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@
c.f https://github.com/jsk-ros-pkg/jsk_recognition/pull/2485
''', file=sys.stderr)
sys.exit(1)
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name ] == []:
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name or "cupy" == p.project_name ] == []:
print('''Please install CuPy
sudo pip install cupy-cuda[your cuda version]
2 changes: 1 addition & 1 deletion jsk_perception/node_scripts/vgg16_object_recognition.py
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@
c.f https://github.com/jsk-ros-pkg/jsk_recognition/pull/2485
''', file=sys.stderr)
sys.exit(1)
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name ] == []:
if [p for p in list(itertools.chain(*[pkg_resources.find_distributions(_) for _ in sys.path])) if "cupy-" in p.project_name or "cupy" == p.project_name ] == []:
print('''Please install CuPy
sudo pip install cupy-cuda[your cuda version]

0 comments on commit 663532b

Please sign in to comment.