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

fix: onnx failing install in newer python versions #368

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

Conversation

HenriqueSchmitz
Copy link

Hello,

I am trying to run this demo that uses your lib, but found that the onnx versions provided in the requirements.txt are not compatible with the newer python versions used by google colab.

In my environment I fixed this by creating the following function:

def replaceVersionedLibraryForGenericVersion(requirementsFilePath, libraryName) -> None:
  requirementsFile = open(requirementsFilePath, "r")
  editedRequirementsText = []
  libCheckString = libraryName + "=="
  for line in requirementsFile:
    if libCheckString in line:
      editedRequirementsText.append(libraryName + "\n")
    else:
      editedRequirementsText.append(line)
  requirementsFile.close()
  newRequirementsFile = open(requirementsFilePath, "w")
  newRequirementsFile.writelines(editedRequirementsText)
  newRequirementsFile.close()

And calling it like this right after cloning the repo:

replaceVersionedLibraryForGenericVersion("ByteTrack/requirements.txt", "onnx")
replaceVersionedLibraryForGenericVersion("ByteTrack/requirements.txt", "onnxruntime")

This fixed my issue, but any other users of this lib will face the same issue. Since the onnx versions required are not fully compatible anymore, I suggest using the most recent versions to avoid this issue.

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.

None yet

1 participant