COLA-Laboratory / issta2020

This repository contains materials related to our DeepSQLi paper published in ISSTA 2020.
GNU General Public License v3.0
15 stars 9 forks source link

Some problem about pip install package #2

Open WayneHsiao0225 opened 3 years ago

WayneHsiao0225 commented 3 years ago

I tried to install the Python package by Pycharm terminal,but I got these error. Thank you!

  1. In generator.py file:

from rep import rep

(venv) hyw@123-07-3695C27373:~/PycharmProjects/SQLi$ pip install rep Collecting rep Using cached rep-0.6.6.tar.gz (72 kB) Requirement already satisfied: numpy>=1.10.0 in ./venv/lib/python3.8/site-packages (from rep) (1.20.2) Collecting scipy>=0.16.0 Using cached scipy-1.6.2-cp38-cp38-manylinux1_x86_64.whl (27.2 MB) Collecting matplotlib==1.5.1 Using cached matplotlib-1.5.1.tar.gz (54.0 MB) ERROR: Command errored out with exit status 1: command: /home/c95hyw/PycharmProjects/SQLi/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wb5wjjqr/matplotlib_30783fc2bfef45f8b8547d5d3cac0be3/setup.py'"'"'; file='"'"'/tmp/pip-install-wb5wjjqr/matplotlib_30783fc2bfef45f8b8547d5d3cac0be3/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-i0ejao4w cwd: /tmp/pip-install-wb5wjjqr/matplotlib_30783fc2bfef45f8b8547d5d3cac0be3/ Complete output (72 lines):

Edit setup.cfg to change the build options

BUILDING MATPLOTLIB
            matplotlib: yes [1.5.1]
                python: yes [3.8.5 (default, Jan 27 2021, 15:41:15)  [GCC
                        9.3.0]]
              platform: yes [linux]

REQUIRED DEPENDENCIES AND EXTENSIONS
                 numpy: yes [version 1.20.2]
              dateutil: yes [dateutil was not found. It is required for date
                        axis support. pip/easy_install may attempt to
                        install it after matplotlib.]
                  pytz: yes [pytz was not found. pip will attempt to install
                        it after matplotlib.]
                cycler: yes [cycler was not found. pip will attempt to
                        install it after matplotlib.]
               tornado: yes [tornado was not found. It is required for the
                        WebAgg backend. pip/easy_install may attempt to
                        install it after matplotlib.]
             pyparsing: yes [using pyparsing version 2.4.7]
                libagg: yes [pkg-config information for 'libagg' could not
                        be found. Using local copy.]
              freetype: no  [The C/C++ header for freetype2 (ft2build.h)
                        could not be found.  You may need to install the
                        development package.]
                   png: no  [pkg-config information for 'libpng' could not
                        be found.]
                 qhull: yes [pkg-config information for 'qhull' could not be
                        found. Using local copy.]

OPTIONAL SUBPACKAGES
           sample_data: yes [installing]
              toolkits: yes [installing]
                 tests: yes [nose 0.11.1 or later is required to run the
                        matplotlib test suite. Please install it with pip or
                        your preferred tool to run the test suite / using
                        unittest.mock]
        toolkits_tests: yes [nose 0.11.1 or later is required to run the
                        matplotlib test suite. Please install it with pip or
                        your preferred tool to run the test suite / using
                        unittest.mock]

OPTIONAL BACKEND EXTENSIONS
                macosx: no  [Mac OS-X only]
                qt5agg: no  [PyQt5 not found]
                qt4agg: no  [PySide not found; PyQt4 not found]
               gtk3agg: no  [Requires pygobject to be installed.]
             gtk3cairo: no  [Requires cairocffi or pycairo to be installed.]
                gtkagg: no  [Requires pygtk]
                 tkagg: no  [The C/C++ header for Tk (tk.h) could not be
                        found.  You may need to install the development
                        package.]
                 wxagg: no  [requires wxPython]
                   gtk: no  [Requires pygtk]
                   agg: yes [installing]
                 cairo: no  [cairocffi or pycairo not found]
             windowing: no  [Microsoft Windows only]

OPTIONAL LATEX DEPENDENCIES
                dvipng: no
           ghostscript: yes [version 9.50]
                 latex: no
               pdftops: yes [version 0.86.1]

OPTIONAL PACKAGE DATA
                  dlls: no  [skipping due to configuration]

============================================================================
                        * The following required packages can not be built:
                        * freetype, png
----------------------------------------

WARNING: Discarding https://files.pythonhosted.org/packages/8f/f4/c0c7e81f64d5f4d36e52e393af687f28882c53dcd924419d684dc9859f40/matplotlib-1.5.1.tar.gz#sha256=3ab8d968eac602145642d0db63dd8d67c85e9a5444ce0e2ecb2a8fedc7224d40 (from https://pypi.org/simple/matplotlib/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. Collecting rep Using cached rep-0.6.5.tar.gz (72 kB) Collecting matplotlib==1.4.3 Using cached matplotlib-1.4.3.tar.gz (50.4 MB) ERROR: Command errored out with exit status 1: command: /home/c95hyw/PycharmProjects/SQLi/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wb5wjjqr/matplotlib_859843e25c9f4e01b447be730c054dd9/setup.py'"'"'; file='"'"'/tmp/pip-install-wb5wjjqr/matplotlib_859843e25c9f4e01b447be730c054dd9/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-04s769r5 cwd: /tmp/pip-install-wb5wjjqr/matplotlib_859843e25c9f4e01b447be730c054dd9/ Complete output (42 lines): Traceback (most recent call last): File "", line 1, in File "/tmp/pip-install-wb5wjjqr/matplotlib_859843e25c9f4e01b447be730c054dd9/setup.py", line 155, in result = package.check() File "/tmp/pip-install-wb5wjjqr/matplotlib_859843e25c9f4e01b447be730c054dd9/setupext.py", line 959, in check return self._check_for_pkg_config( File "/tmp/pip-install-wb5wjjqr/matplotlib_859843e25c9f4e01b447be730c054dd9/setupext.py", line 445, in _check_for_pkg_config if (not is_min_version(version, min_version)): File "/tmp/pip-install-wb5wjjqr/matplotlib_859843e25c9f4e01b447be730c054dd9/setupext.py", line 173, in is_min_version return found_version >= expected_version File "/usr/lib/python3.8/distutils/version.py", line 70, in ge c = self._cmp(other) File "/usr/lib/python3.8/distutils/version.py", line 337, in _cmp if self.version < other.version: TypeError: '<' not supported between instances of 'str' and 'int'

Edit setup.cfg to change the build options

BUILDING MATPLOTLIB
            matplotlib: yes [1.4.3]
                python: yes [3.8.5 (default, Jan 27 2021, 15:41:15)  [GCC
                        9.3.0]]
              platform: yes [linux]

REQUIRED DEPENDENCIES AND EXTENSIONS
                 numpy: yes [version 1.20.2]
                   six: yes [six was not found.pip will attempt to install
                        it after matplotlib.]
              dateutil: yes [dateutil was not found. It is required for date
                        axis support. pip/easy_install may attempt to
                        install it after matplotlib.]
                  pytz: yes [pytz was not found. pip will attempt to install
                        it after matplotlib.]
               tornado: yes [tornado was not found. It is required for the
                        WebAgg backend. pip/easy_install may attempt to
                        install it after matplotlib.]
             pyparsing: yes [using pyparsing version 2.4.7]
                 pycxx: yes [Official versions of PyCXX are not compatible
                        with matplotlib on Python 3.x, since they lack
                        support for the buffer object.  Using local copy]
                libagg: yes [pkg-config information for 'libagg' could not
                        be found. Using local copy.]
----------------------------------------

WARNING: Discarding https://files.pythonhosted.org/packages/bb/ac/485df0ecb15aa6fec1991945dc0cabfeb724a64f6729e34bab3c6a766813/matplotlib-1.4.3.tar.gz#sha256=61f201c6a82e89e4d9e324266203fad44f95fd8f36d8eec0d8690273e1182f75 (from https://pypi.org/simple/matplotlib/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. Collecting rep Using cached rep-0.6.4.tar.gz (71 kB) Using cached rep-0.6.3.tar.gz (66 kB) Collecting ipython[all]==3.2.0 Using cached ipython-3.2.0-py3-none-any.whl (3.4 MB) Collecting pyzmq==14.3.1 Using cached pyzmq-14.3.1.zip (1.3 MB) Collecting matplotlib==1.3.1 Using cached matplotlib-1.3.1.tar.gz (42.7 MB) ERROR: Command errored out with exit status 1: command: /home/c95hyw/PycharmProjects/SQLi/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wb5wjjqr/matplotlib_9ab131b824d6463d85c6474d2ce12d21/setup.py'"'"'; file='"'"'/tmp/pip-install-wb5wjjqr/matplotlib_9ab131b824d6463d85c6474d2ce12d21/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-_xsn1wqm cwd: /tmp/pip-install-wb5wjjqr/matplotlib_9ab131b824d6463d85c6474d2ce12d21/ Complete output (57 lines):

Edit setup.cfg to change the build options

BUILDING MATPLOTLIB
            matplotlib: yes [1.3.1]
                python: yes [3.8.5 (default, Jan 27 2021, 15:41:15)  [GCC
                        9.3.0]]
              platform: yes [linux]

REQUIRED DEPENDENCIES AND EXTENSIONS
                 numpy: yes [version 1.20.2]
              dateutil: yes [dateutil was not found. It is required for date
                        axis support. pip/easy_install may attempt to
                        install it after matplotlib.]
               tornado: yes [tornado was not found. It is required for the
                        WebAgg backend. pip/easy_install may attempt to
                        install it after matplotlib.]
             pyparsing: yes [using pyparsing version 2.4.7]
                 pycxx: yes [Official versions of PyCXX are not compatible
                        with Python 3.x.  Using local copy]
                libagg: yes [pkg-config information for 'libagg' could not
                        be found. Using local copy.]
              freetype: no  [pkg-config information for 'freetype2' could
                        not be found.]
                   png: yes [pkg-config information for 'libpng' could not
                        be found. Using unknown version.]

OPTIONAL SUBPACKAGES
           sample_data: yes [installing]
              toolkits: yes [installing]
                 tests: yes [nose 0.11.1 or later is required to run the
                        matplotlib test suite]

OPTIONAL BACKEND EXTENSIONS
                macosx: no  [Mac OS-X only]
                qt4agg: no  [PyQt4 not found]
               gtk3agg: no  [gtk3agg backend does not work on Python 3]
             gtk3cairo: no  [Requires cairo to be installed.]
                gtkagg: no  [Requires pygtk]
                 tkagg: no  [The C/C++ header for Tk (tk.h) could not be
                        found.  You may need to install the development
                        package.]
                 wxagg: no  [requires wxPython]
                   gtk: no  [Requires pygtk]
                   agg: yes [installing]
                 cairo: no  [cairo not found]
             windowing: no  [Microsoft Windows only]

OPTIONAL LATEX DEPENDENCIES
                dvipng: no
           ghostscript: yes [version 9.50]
                 latex: no
               pdftops: yes [version 0.86.1]

============================================================================
                        * The following required packages can not be built:
                        * freetype
----------------------------------------

WARNING: Discarding https://files.pythonhosted.org/packages/d4/d0/17f17792a4d50994397052220dbe3ac9850ecbde0297b7572933fa4a5c98/matplotlib-1.3.1.tar.gz#sha256=de3ad56f7dd14a9652d9da6bfcd7983129697794b82798ff92c78bb4206423dd (from https://pypi.org/simple/matplotlib/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. ERROR: Cannot install rep==0.6.3, rep==0.6.4, rep==0.6.5 and rep==0.6.6 because these package versions have conflicting dependencies.

The conflict is caused by: rep 0.6.6 depends on matplotlib==1.5.1 rep 0.6.5 depends on matplotlib==1.4.3 rep 0.6.4 depends on matplotlib==1.4.3 rep 0.6.3 depends on matplotlib==1.3.1

To fix this you could try to:

  1. loosen the range of package versions you've specified
  2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies (venv) hyw@123-07-3695C27373:~/PycharmProjects/SQLi$

  1. main.py file:

import SQLInjection

I cannot find this package.

WayneHsiao0225 commented 3 years ago

@JerryI00

JerryI00 commented 3 years ago

Hello,

Sorry for my extremely late response. The deployment of DeepSQLi is very picky since we use other third party applications for help like AMNESIA which has a very strict restriction on the VM and Java versions. Since this code was developed by my previous student who is moving to banking industry, I would recommend you to contact with her (muyangl@foxmail.com) to get some more information about the deployment.

Best regards, Ke