fredzzhang / upt

[CVPR'22] Official PyTorch implementation for paper "Efficient Two-Stage Detection of Human–Object Interactions with a Novel Unary–Pairwise Transformer"
https://fredzzhang.com/unary-pairwise-transformers
BSD 3-Clause "New" or "Revised" License
144 stars 26 forks source link

environment #46

Closed SherlockHolmes221 closed 2 years ago

SherlockHolmes221 commented 2 years ago

ModuleNotFoundError: No module named 'pocket.data'; 'pocket' is not a package I have installed pocket using pip3 install pocket

fredzzhang commented 2 years ago

Hi @SherlockHolmes221,

pocket is not a published package. Please follow the installation instructions here

Fred.

SherlockHolmes221 commented 2 years ago

Thx

leijue222 commented 1 year ago

I followed this step and run mnist.pysuccessful. But under UPT, I still failed with pocket environment.

(pocket) ming-t@mingt-Z490-UD:UPT/pocket$ conda develop pocket
added /media/ming-t/Deng/relation_mppe/HOI-UPT/pocket-lib/pocket
completed operation for: /media/ming-t/Deng/relation_mppe/HOI-UPT/pocket-lib/pocket

(pocket) ming-t@mingt-Z490-UD:UPT/pocket$ python inference.py --resume checkpoints/upt-r50-vcoco.pt --image-path ./assets/umbrella.jpeg --action 0 --dataset vcoco
Traceback (most recent call last):
  File "inference.py", line 12, in <module>
    import pocket
ModuleNotFoundError: No module named 'pocket'
fredzzhang commented 1 year ago

Hi @leijue222,

Can you print out the system paths in Python and attach the results?

import sys
print(sys.path)
leijue222 commented 1 year ago

['', '/home/ming-t/anaconda3/envs/pocket/lib/python38.zip', '/home/ming-t/anaconda3/envs/pocket/lib/python3.8', '/home/ming-t/anaconda3/envs/pocket/lib/python3.8/lib-dynload', '/home/ming-t/anaconda3/envs/pocket/lib/python3.8/site-packages', '/media/ming-t/Deng/relation_mppe/HOI-UPT/pocket-lib/pocket', '/media/ming-t/Deng/relation_mppe/HOI-UPT/pocket']

image

Thanks, I solved the environment problem by moving the pocket directory to the root directory

fredzzhang commented 1 year ago

Ok, that's good to hear. You seem to have added multiple copies of the pocket library to the system path. That might have caused some confusion.

'/media/ming-t/Deng/relation_mppe/HOI-UPT/pocket-lib/pocket'
'/media/ming-t/Deng/relation_mppe/HOI-UPT/pocket'

In general, it's probably better to keep pocket in a different position other than where your projects are, just as you did in the end.