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

Update requirements.txt File #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AntiiRain
Copy link

Changes Made

  • Updated requirements.txt to add version constraints for protobuf < 3.20 and numpy < 1.20, to avoid issues caused by deprecated functionalities in newer versions.
  • Ensured that the project environment can now be set up using pip install -r requirements.txt without errors.
  • The changes were tested on two different devices, and the project runs as expected on both.

Reasons for the Changes

  • Protobuf Version Issue:

    • When installing newer versions of protobuf (e.g., version 5.28.2), the following error occurs:
      If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
      
      If you cannot immediately regenerate your protos, some other possible workarounds are:
        1. Downgrade the protobuf package to 3.20.x or lower.
        2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
      
    • To resolve this, I added a constraint to limit protobuf versions to < 3.20 in the requirements list.
  • NumPy Version Issue:

    • When installing newer versions of numpy, an error occurs in TensorFlow 2.2 due to deprecated functionality:
      AttributeError: module 'numpy' has no attribute 'object'.
      
      `np.object` was a deprecated alias for the builtin `object`. To avoid this error in existing code, use `object` by itself. Doing this will not modify any behavior and is safe.
      
    • The alias was deprecated in NumPy 1.20, as noted in the release documentation: NumPy 1.20 Deprecations.
    • To fix this, I updated the version requirement to numpy>=1.14.3, < 1.20.

Testing

  • The updated dependencies were tested on two devices, and the environment configured using pip install -r requirements.txt worked without any issues on both.

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

Successfully merging this pull request may close these issues.

1 participant