Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module 'utils' has no attribute 'compute_rotation_matrix_from_ortho6d' #53

Open
dentistfrankchen opened this issue Mar 31, 2024 · 4 comments

Comments

@dentistfrankchen
Copy link

No description provided.

@WengRan
Copy link

WengRan commented Apr 9, 2024

+1

@raincrash
Copy link

Works for me with pip install sixdrepnet==0.1.5. 0.1.6 seems to be broken.

@thohemp
Copy link
Owner

thohemp commented Apr 24, 2024

Can you specify the issue?

@vtt-rasanen
Copy link

Hi,

The issue here is that source code files listed below have the statement "import utils":

  • create_filename_list.py
  • datasets.py
  • demo.py
  • model.py
  • regressor.py
  • test.py

Python version 3.10 and later have a system-wide Python package, called 'utils', that has a higher precedence over any local file instance called utils.py. As a result, all the 6DRepNet files listed above refer the system-wide Python module 'utils' instead of the desired local counterpart. Since the system-wide 'utils' is targeted for totally different purposes and excludes the function compute_rotation_matrix_from_ortho6d(), we see the error message
AttributeError: module 'utils' has no attribute 'compute_rotation_matrix_from_ortho6d'

There are at least two workarounds to solve the issue:

  1. Rename the 6DRepNet file from utils.py to something different, like sixdrepnet_utils.py, and update all the references "import utils" accordingly (i.e., like "import sixdrepnet_utils".

  2. Since 6DRepNet gets build in a package, called sixdrepnet, the most straightforward fix might be to replace all the references "import utils" to "import sixdrepnet.utils".

In general, please discontinue completing the package installation using the commands "python setup.py install" and/or "pip install -e .". These are not supported in PIP version 24.3.1 and later. A simple alternative way would include the following:

  1. Create an appropriate Wheel package.
    python setup.py bdist_wheel
  2. Install the package using PIP from the Wheel package explicitly.
    pip install <path_to_wheel_file>

A few references for further information:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants