Skip to content
Advertisement

ERROR: pyzmq has an invalid wheel, multiple .dist-info directories found: libsodium-1.0.17.dist-info, pyzmq-18.1.0.dist-info

I have a problem cloning a project from GitHub. The error occurs when I try to install the requirements.txt file:

ERROR: pyzmq has an invalid wheel, multiple .dist-info directories found: libsodium-1.0.17.dist-info, pyzmq-18.1.0.dist-info

I tried the below options but nothing worked. Any idea how can I solve the problem?

pip install –no-cache-dir -r requirements.txt

pip install –no-binary=:all: pyzmq==18.1.0

pip install wheel

I also opened the requirements.txt file and removed this package, but other packages didn’t install correctly!

Advertisement

Answer

EDIT: Solution based on specific repo mentioned by OP:

I was able to install the requirements.txt in this repo using the following steps. Tested on Windows 10 and Python 3.7.

  1. Download the scipy v1.3.1 wheel file from here. Only Python 3.5-3.7 are supported, so pick the right version (cp35-cp37). Also pick the right OS and 32/64-bits version.
  2. Run pip install scipy-1.3.1-cp37-cp37m-win_amd64.whl (for example) from the folder where the .whl file is.
  3. In requirements.txt: change tensorflow==2.0.0b0 to tensorflow==2.0.0
  4. In requirements.txt: change torch==1.3.0 to torch==1.9.0
  5. Run pip install -r requirements.txt

Original Answer:

I personally saw the pyzmq has an invalid wheel error while installing tensorflow==2.7.0 with tfx==1.3.3. According to the tfx repo, these versions are not compatible, and result in a dependency conflict. You might have two similar dependencies that are doing the same.

I solved this in 3 ways:

  1. Specify compatible versions. In my case, switching to tensorflow==2.6.0 worked.
  2. Search for and remove redundant dependencies. In my case, tensorflow is already included with tfx. Removing it fixed the problem (actually there was another bug, but that’s off-topic).
  3. Add a specific version of pyzmq to your requirements.txt to force the resolution. I used the latest version (pyzmq==22.3.0), which also fixed the issue.

To help debug the problem, you can view the pip dependency tree using pipdeptree. See this answer.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement