krmaxwell / maltrieve

A tool to retrieve malware directly from the source for security researchers.
GNU General Public License v3.0
562 stars 184 forks source link

setup.py fails #112

Closed krmaxwell closed 9 years ago

krmaxwell commented 9 years ago

When testing a Docker build, I got the following error:

Step 7 : RUN git clone https://github.com/krmaxwell/maltrieve.git &&  cd maltrieve &&  python setup.py install &&  chown -R maltrieve:maltrieve /home/maltrieve
 ---> Running in e15c89a74619
Cloning into 'maltrieve'...
Traceback (most recent call last):
  File "setup.py", line 6, in <module>
    reqs = [str(ir.req) for ir in install_reqs]
  File "/usr/local/lib/python2.7/dist-packages/pip/req/req_file.py", line 19, in parse_requirements
    "parse_requirements() missing 1 required keyword argument: "
TypeError: parse_requirements() missing 1 required keyword argument: 'session'
2015/03/19 14:46:24 The command [/bin/sh -c git clone https://github.com/krmaxwell/maltrieve.git &&  cd maltrieve &&  python setup.py install &&  chown -R maltrieve:maltrieve /home/maltrieve] returned a non-zero code: 1

This appears to be because pip never intended to support this usage:

You really don't want to do this. Speaking as a pip maintainer pip does not support being called as an API like this at all. In fact pip 1.6 (next version at this time) moves this function.

This should be considered a production-breaking bug.

krmaxwell commented 9 years ago

Also, use pip install ..

Source: http://stackoverflow.com/questions/15724093/difference-between-python-setup-py-install-and-pip-install