0

Context: I am working with python codes developed by different teams and each teams provides their corresponding requirements file. Trying to install the requirements via pip (pip install -r requirements.txt) is resulting in error of the following type:

ERROR: Invalid requirement: 'python-scipy = 0.18.1-2~pn1' (from line 13 of dependencies.txt)
Hint: = is not a valid operator. Did you mean == ?

and according to this post a possible reason is that the requirements file I have are conda generated. When trying to install the requirements using conda (conda install --file requirements.txt) the following error appears:

InvalidVersionSpec: Invalid version '0.18.1-2~pn1': invalid character(s)

I don't know what is the standard procedure to determine how a requirements file was generated in order to determine how it should be installed.

Questions:

  1. Given a requirements file, what is the standard procedure to use in order to determine how it was generated?
  2. Do the the characters like "~" - appearing at the end of requirements - offer any hint about how the file was generated?
  3. What else can I try to use in order to install the requirement file with requirements that contain such invalid characters for conda?
Mirc
  • 3
  • 1

0 Answers0