MISP / misp-dashboard

A live dashboard for a real-time overview of threat intelligence from MISP instances
GNU Affero General Public License v3.0
194 stars 65 forks source link

pycountry module install error #157

Closed woodonggyu closed 3 years ago

woodonggyu commented 3 years ago

Hello.

I'm trying to install misp-dashboard project. when install pycountry module, it occur error.

Environments

The contents of the error are as follows. I hope to solve these issue.

Thank you.

Collecting pycountry
  Using cached pycountry-20.7.3.tar.gz (10.1 MB)
Building wheels for collected packages: pycountry
  Building wheel for pycountry (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: '/home/docker/MISP(Malware Sharing Platform)/misp-dashboard/DASHENV/bin/python3' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-kn9e2yk7/pycountry_10ba1f353e1347919a843e86cd3f49a3/setup.py'"'"'; __file__='"'"'/tmp/pip-install-kn9e2yk7/pycountry_10ba1f353e1347919a843e86cd3f49a3/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-pbqvxd6f
       cwd: /tmp/pip-install-kn9e2yk7/pycountry_10ba1f353e1347919a843e86cd3f49a3/
  Complete output (48 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib
  creating build/lib/pycountry
  copying src/pycountry/__init__.py -> build/lib/pycountry
  copying src/pycountry/db.py -> build/lib/pycountry
  running egg_info
  writing dependency_links to src/pycountry.egg-info/dependency_links.txt
  writing src/pycountry.egg-info/PKG-INFO
  writing top-level names to src/pycountry.egg-info/top_level.txt
  reading manifest file 'src/pycountry.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no previously-included files matching '*.py[co]' found anywhere in distribution
  adding license file 'LICENSE.txt'
  writing manifest file 'src/pycountry.egg-info/SOURCES.txt'
  creating build/lib/pycountry/databases
  copying src/pycountry/databases/iso15924.json -> build/lib/pycountry/databases
  Traceback (most recent call last):
    File "", line 1, in 
    File "/tmp/pip-install-kn9e2yk7/pycountry_10ba1f353e1347919a843e86cd3f49a3/setup.py", line 44, in 
      package_dir={'': 'src'})
    File "/home/docker/MISP(Malware Sharing Platform)/misp-dashboard/DASHENV/lib/python3.6/site-packages/setuptools/__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
    File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/home/docker/MISP(Malware Sharing Platform)/misp-dashboard/DASHENV/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 299, in run
      self.run_command('build')
    File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/home/docker/MISP(Malware Sharing Platform)/misp-dashboard/DASHENV/lib/python3.6/site-packages/setuptools/command/build_py.py", line 56, in run
      self.build_package_data()
    File "/home/docker/MISP(Malware Sharing Platform)/misp-dashboard/DASHENV/lib/python3.6/site-packages/setuptools/command/build_py.py", line 127, in build_package_data
      srcfile in self.distribution.convert_2to3_doctests):
  TypeError: argument of type 'NoneType' is not iterable
  ----------------------------------------
  ERROR: Failed building wheel for pycountry
  Running setup.py clean for pycountry
Failed to build pycountry
Installing collected packages: pycountry
    Running setup.py install for pycountry ... error
    ERROR: Command errored out with exit status 1:
     command: '/home/docker/MISP(Malware Sharing Platform)/misp-dashboard/DASHENV/bin/python3' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-kn9e2yk7/pycountry_10ba1f353e1347919a843e86cd3f49a3/setup.py'"'"'; __file__='"'"'/tmp/pip-install-kn9e2yk7/pycountry_10ba1f353e1347919a843e86cd3f49a3/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-8f668qec/install-record.txt --single-version-externally-managed --compile --install-headers '/home/docker/MISP(Malware Sharing Platform)/misp-dashboard/DASHENV/include/site/python3.6/pycountry'
         cwd: /tmp/pip-install-kn9e2yk7/pycountry_10ba1f353e1347919a843e86cd3f49a3/
    Complete output (50 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib
    creating build/lib/pycountry
    copying src/pycountry/__init__.py -> build/lib/pycountry
    copying src/pycountry/db.py -> build/lib/pycountry
    running egg_info
    writing dependency_links to src/pycountry.egg-info/dependency_links.txt
    writing src/pycountry.egg-info/PKG-INFO
    writing top-level names to src/pycountry.egg-info/top_level.txt
    reading manifest file 'src/pycountry.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no previously-included files matching '*.py[co]' found anywhere in distribution
    adding license file 'LICENSE.txt'
    writing manifest file 'src/pycountry.egg-info/SOURCES.txt'
    creating build/lib/pycountry/databases
    copying src/pycountry/databases/iso15924.json -> build/lib/pycountry/databases
    Traceback (most recent call last):
      File "", line 1, in 
      File "/tmp/pip-install-kn9e2yk7/pycountry_10ba1f353e1347919a843e86cd3f49a3/setup.py", line 44, in 
        package_dir={'': 'src'})
      File "/home/docker/MISP(Malware Sharing Platform)/misp-dashboard/DASHENV/lib/python3.6/site-packages/setuptools/__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/home/docker/MISP(Malware Sharing Platform)/misp-dashboard/DASHENV/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/usr/lib/python3.6/distutils/command/install.py", line 589, in run
        self.run_command('build')
      File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/home/docker/MISP(Malware Sharing Platform)/misp-dashboard/DASHENV/lib/python3.6/site-packages/setuptools/command/build_py.py", line 56, in run
        self.build_package_data()
      File "/home/docker/MISP(Malware Sharing Platform)/misp-dashboard/DASHENV/lib/python3.6/site-packages/setuptools/command/build_py.py", line 127, in build_package_data
        srcfile in self.distribution.convert_2to3_doctests):
    TypeError: argument of type 'NoneType' is not iterable
woodonggyu commented 3 years ago

Sorry, I solved issue. It was a problem while using Python version 2/3 at the same time.

Thank you.