2

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!

DV82XL
  • 5,350
  • 5
  • 30
  • 59
raha
  • 43
  • 4
  • Did you fix this? Which repo is the requirement.txt located in? It might help to know which packages are being installed. – DV82XL Nov 10 '21 at 02:47
  • No it is not fixed yet. the repo address is repo address is: https://github.com/ChrisFugl/Intrusing-Detection-System-Attack – raha Nov 10 '21 at 04:45
  • 1
    Did you try asking on the issue tracker for that repository? – Karl Knechtel Nov 10 '21 at 04:53
  • What OS and version of Python are you using? I tried installing the requirements on Windows 10 with Python 3.7 and 3.8 and had issues with `scipy==1.3.1` (see [here](https://stackoverflow.com/questions/28190534/windows-scipy-install-no-lapack-blas-resources-found)). I did not get the same error message as you. – DV82XL Nov 10 '21 at 05:34
  • the version of python is 3.8.3 and I am working on windows 64. which spicy version works? – raha Nov 10 '21 at 14:37
  • Try downloading [SciPy v.1.3.2.](https://github.com/scipy/scipy/releases/tag/v1.3.2) That's the first version where support for Python 3.8 was added. – DV82XL Nov 10 '21 at 22:35

1 Answers1

0

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.

DV82XL
  • 5,350
  • 5
  • 30
  • 59