oasis-open / cti-pattern-validator

OASIS TC Open Repository: Validate patterns used to express cyber observable content in STIX Indicators
https://stix2-patterns.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
26 stars 23 forks source link

pip installing under Python 3.4 is currently broken #44

Closed treyka closed 6 years ago

treyka commented 6 years ago
  Downloading stix2_patterns-0.6.0-py2.py3-none-any.whl
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/home/trey/docs/projects/oasis_cti_tc/trey_testing/venv/lib/python-wheels/setuptools-5.5.1-py2.py3-none-any.whl/pkg_resources.py
", line 2595, in _dep_map
    return self.__dep_map
  File "/home/trey/docs/projects/oasis_cti_tc/trey_testing/venv/lib/python-wheels/setuptools-5.5.1-py2.py3-none-any.whl/pkg_resources.py
", line 2457, in __getattr__
    raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/trey/docs/projects/oasis_cti_tc/trey_testing/venv/lib/python3.4/site-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/home/trey/docs/projects/oasis_cti_tc/trey_testing/venv/lib/python3.4/site-packages/pip/commands/install.py", line 290, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/home/trey/docs/projects/oasis_cti_tc/trey_testing/venv/lib/python3.4/site-packages/pip/req.py", line 1266, in prepare_files
    req_to_install.extras):
  File "/home/trey/docs/projects/oasis_cti_tc/trey_testing/venv/lib/python-wheels/setuptools-5.5.1-py2.py3-none-any.whl/pkg_resources.py
", line 2401, in requires
    dm = self._dep_map
  File "/home/trey/docs/projects/oasis_cti_tc/trey_testing/venv/lib/python-wheels/setuptools-5.5.1-py2.py3-none-any.whl/pkg_resources.py
", line 2597, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "/home/trey/docs/projects/oasis_cti_tc/trey_testing/venv/lib/python-wheels/setuptools-5.5.1-py2.py3-none-any.whl/pkg_resources.py
", line 2622, in _compute_dependencies
    parsed.marker_fn = compile_marker(mark)
  File "/home/trey/docs/projects/oasis_cti_tc/trey_testing/venv/lib/python-wheels/setuptools-5.5.1-py2.py3-none-any.whl/_markerlib/markers.py", line 105, in compile
    compiled_marker = compile_marker(parse_marker(marker))
  File "/home/trey/docs/projects/oasis_cti_tc/trey_testing/venv/lib/python-wheels/setuptools-5.5.1-py2.py3-none-any.whl/_markerlib/marke
rs.py", line 84, in parse_marker
    tree = ast.parse(marker, mode='eval')
  File "/usr/lib/python3.4/ast.py", line 35, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 1
    python_version ~= "3.3.0"
                   ^
SyntaxError: invalid syntax

Storing debug log for failure in /home/trey/.pip/pip.log
treyka commented 6 years ago

Googling for that last error python_version ~= "3.3.0", the first three results are for this Github project. (It used to work.)

treyka commented 6 years ago

Nevermind - for some reason the version of setuptools on this particular host was obsolete. A quick pip install -U setuptools resolved the issue.

gtback commented 6 years ago

Thanks, @treyka . Glad you figured it out. We had a lot of problems with conditional dependencies, combined with older versions of pip, wheel, and setuptools, Hopefully if other people run into the same problem they'll see this issue.