ibm-dev-incubator / demoparser

Apache License 2.0
34 stars 10 forks source link

Multiple errors installing #18

Open psychosopher opened 4 years ago

psychosopher commented 4 years ago

Hi, I was really excited to find a python package to parse CS:GO demo But I met some troubling problems installing the package.

First I tried pip install csgo-demoparser

And I got errors:

Building wheels for collected packages: csgo-demoparser
  Building wheel for csgo-demoparser (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'D:\Software\Anaconda\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\TANGJI~1\\AppData\\Local\\Temp\\pip-install-6ivzr_70\\csgo-demoparser\\setup.py'"'"'; __file__='"'"'C:\\Users\\TANGJI~1\\AppData\\Local\\Temp\\pip-install-6ivzr_70\\csgo-demoparser\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\TANGJI~1\AppData\Local\Temp\pip-wheel-f3dqbkzm'
       cwd: C:\Users\TANGJI~1\AppData\Local\Temp\pip-install-6ivzr_70\csgo-demoparser\
  Complete output (38 lines):
  running bdist_wheel
  running build
  running build_py
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "C:\Users\TANGJI~1\AppData\Local\Temp\pip-install-6ivzr_70\csgo-demoparser\setup.py", line 35, in <module>
      "language_level": 3
    File "D:\Software\Anaconda\lib\distutils\core.py", line 148, in setup
      dist.run_commands()
    File "D:\Software\Anaconda\lib\distutils\dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "D:\Software\Anaconda\lib\distutils\dist.py", line 974, in run_command
      cmd_obj.run()
    File "D:\Software\Anaconda\lib\site-packages\wheel\bdist_wheel.py", line 192, in run
      self.run_command('build')
    File "D:\Software\Anaconda\lib\distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "D:\Software\Anaconda\lib\distutils\dist.py", line 974, in run_command
      cmd_obj.run()
    File "D:\Software\Anaconda\lib\distutils\command\build.py", line 135, in run
      self.run_command(cmd_name)
    File "D:\Software\Anaconda\lib\distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "D:\Software\Anaconda\lib\distutils\dist.py", line 974, in run_command
      cmd_obj.run()
    File "C:\Users\TANGJI~1\AppData\Local\Temp\pip-install-6ivzr_70\csgo-demoparser\demoparser\_setup_hooks.py", line 21, in run
      self.protoc()
    File "C:\Users\TANGJI~1\AppData\Local\Temp\pip-install-6ivzr_70\csgo-demoparser\demoparser\_setup_hooks.py", line 18, in protoc
      ], check=True)
    File "D:\Software\Anaconda\lib\subprocess.py", line 423, in run
      with Popen(*popenargs, **kwargs) as process:
    File "D:\Software\Anaconda\lib\subprocess.py", line 729, in __init__
      restore_signals, start_new_session)
    File "D:\Software\Anaconda\lib\subprocess.py", line 991, in _execute_child
      args = list2cmdline(args)
    File "D:\Software\Anaconda\lib\subprocess.py", line 481, in list2cmdline
      needquote = (" " in arg) or ("\t" in arg) or not arg
  TypeError: argument of type 'NoneType' is not iterable
  ----------------------------------------
  ERROR: Failed building wheel for csgo-demoparser
  Running setup.py clean for csgo-demoparser
Failed to build csgo-demoparser
Installing collected packages: csgo-demoparser
    Running setup.py install for csgo-demoparser ... error
    ERROR: Command errored out with exit status 1:
     command: 'D:\Software\Anaconda\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\TANGJI~1\\AppData\\Local\\Temp\\pip-install-6ivzr_70\\csgo-demoparser\\setup.py'"'"'; __file__='"'"'C:\\Users\\TANGJI~1\\AppData\\Local\\Temp\\pip-install-6ivzr_70\\csgo-demoparser\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\TANGJI~1\AppData\Local\Temp\pip-record-_6ys973k\install-record.txt' --single-version-externally-managed --compile --install-headers 'D:\Software\Anaconda\Include\csgo-demoparser'
         cwd: C:\Users\TANGJI~1\AppData\Local\Temp\pip-install-6ivzr_70\csgo-demoparser\
    Complete output (42 lines):
    running install
    [pbr] Generating AUTHORS
    [pbr] AUTHORS complete (0.0s)
    running build
    running build_py
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\TANGJI~1\AppData\Local\Temp\pip-install-6ivzr_70\csgo-demoparser\setup.py", line 35, in <module>
        "language_level": 3
      File "D:\Software\Anaconda\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "D:\Software\Anaconda\lib\distutils\dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "D:\Software\Anaconda\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "D:\Software\Anaconda\lib\site-packages\pbr\packaging.py", line 243, in run
        return du_install.install.run(self)
      File "D:\Software\Anaconda\lib\distutils\command\install.py", line 545, in run
        self.run_command('build')
      File "D:\Software\Anaconda\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "D:\Software\Anaconda\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "D:\Software\Anaconda\lib\distutils\command\build.py", line 135, in run
        self.run_command(cmd_name)
      File "D:\Software\Anaconda\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "D:\Software\Anaconda\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "C:\Users\TANGJI~1\AppData\Local\Temp\pip-install-6ivzr_70\csgo-demoparser\demoparser\_setup_hooks.py", line 21, in run
        self.protoc()
      File "C:\Users\TANGJI~1\AppData\Local\Temp\pip-install-6ivzr_70\csgo-demoparser\demoparser\_setup_hooks.py", line 18, in protoc
        ], check=True)
      File "D:\Software\Anaconda\lib\subprocess.py", line 423, in run
        with Popen(*popenargs, **kwargs) as process:
      File "D:\Software\Anaconda\lib\subprocess.py", line 729, in __init__
        restore_signals, start_new_session)
      File "D:\Software\Anaconda\lib\subprocess.py", line 991, in _execute_child
        args = list2cmdline(args)
      File "D:\Software\Anaconda\lib\subprocess.py", line 481, in list2cmdline
        needquote = (" " in arg) or ("\t" in arg) or not arg
    TypeError: argument of type 'NoneType' is not iterable
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'D:\Software\Anaconda\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\TANGJI~1\\AppData\\Local\\Temp\\pip-install-6ivzr_70\\csgo-demoparser\\setup.py'"'"'; __file__='"'"'C:\\Users\\TANGJI~1\\AppData\\Local\\Temp\\pip-install-6ivzr_70\\csgo-demoparser\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\TANGJI~1\AppData\Local\Temp\pip-record-_6ys973k\install-record.txt' --single-version-externally-managed --compile --install-headers 'D:\Software\Anaconda\Include\csgo-demoparser' Check the logs for full command output.

Then I tried

git clone https://github.com/kpei/demoparser.git
python setup.py install

And I got:

`running install
[pbr] Writing ChangeLog
[pbr] Generating ChangeLog
[pbr] ChangeLog complete (0.0s)
[pbr] Generating AUTHORS
[pbr] AUTHORS complete (0.1s)
running build
running build_py
FileNotFoundError: [WinError 2] `

I tried to directly run the file "setup.py" but I got:

D:\Software\Anaconda\python.exe D:/demoparser-master/setup.py
ERROR:root:Error parsing
Traceback (most recent call last):
  File "D:\Software\Anaconda\lib\site-packages\pbr\core.py", line 96, in pbr
    attrs = util.cfg_to_args(path, dist.script_args)
  File "D:\Software\Anaconda\lib\site-packages\pbr\util.py", line 271, in cfg_to_args
    pbr.hooks.setup_hook(config)
  File "D:\Software\Anaconda\lib\site-packages\pbr\hooks\__init__.py", line 25, in setup_hook
    metadata_config.run()
  File "D:\Software\Anaconda\lib\site-packages\pbr\hooks\base.py", line 27, in run
    self.hook()
  File "D:\Software\Anaconda\lib\site-packages\pbr\hooks\metadata.py", line 26, in hook
    self.config['name'], self.config.get('version', None))
  File "D:\Software\Anaconda\lib\site-packages\pbr\packaging.py", line 876, in get_version
    name=package_name))
Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It's also possible that there is a mismatch between the package name in setup.cfg and the argument given to pbr.version.VersionInfo. Project name csgo-demoparser was given, but was not able to be found.
error in setup command: Error parsing D:\demoparser-master\setup.cfg: Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It's also possible that there is a mismatch between the package name in setup.cfg and the argument given to pbr.version.VersionInfo. Project name csgo-demoparser was given, but was not able to be found.

Process finished with exit code 1`

I updated pbr and other packages but same thing happened.

I also tried to execute this in the downloaded directory

pip install -r requirements.txt
pip install .

but errors occured executing the second line

Building wheels for collected packages: csgo-demoparser
  Building wheel for csgo-demoparser (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'D:\Software\Anaconda\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\TANGJI~1\\AppData\\Local\\Temp\\pip-req-build-cw70sr44\\setup.py'"'"'; __file__='"'"'C:\\Users\\TANGJI~1\\AppData\\Local\\Temp\\pip-req-build-cw70sr44\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\TANGJI~1\AppData\Local\Temp\pip-wheel-b6sq1xoi'
       cwd: C:\Users\TANGJI~1\AppData\Local\Temp\pip-req-build-cw70sr44\
  Complete output (4 lines):
  running bdist_wheel
  running build
  running build_py
  **FileNotFoundError**: [WinError 2]
  ----------------------------------------
  ERROR: Failed building wheel for csgo-demoparser
  Running setup.py clean for csgo-demoparser
Failed to build csgo-demoparser
Installing collected packages: csgo-demoparser
    Running setup.py install for csgo-demoparser ... error
    ERROR: Command errored out with exit status 1:
     command: 'D:\Software\Anaconda\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\TANGJI~1\\AppData\\Local\\Temp\\pip-req-build-cw70sr44\\setup.py'"'"'; __file__='"'"'C:\\Users\\TANGJI~1\\AppData\\Local\\Temp\\pip-req-build-cw70sr44\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\TANGJI~1\AppData\Local\Temp\pip-record-znzt6tau\install-record.txt' --single-version-externally-managed --compile --install-headers 'D:\Software\Anaconda\Include\csgo-demoparser'
         cwd: C:\Users\TANGJI~1\AppData\Local\Temp\pip-req-build-cw70sr44\
    Complete output (9 lines):
    running install
    [pbr] Writing ChangeLog
    [pbr] Generating ChangeLog
    [pbr] ChangeLog complete (0.0s)
    [pbr] Generating AUTHORS
    [pbr] AUTHORS complete (0.1s)
    running build
    running build_py
    **FileNotFoundError**: [WinError 2]
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'D:\Software\Anaconda\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\TANGJI~1\\AppData\\Local\\Temp\\pip-req-build-cw70sr44\\setup.py'"'"'; __file__='"'"'C:\\Users\\TANGJI~1\\AppData\\Local\\Temp\\pip-req-build-cw70sr44\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\TANGJI~1\AppData\Local\Temp\pip-record-znzt6tau\install-record.txt' --single-version-externally-managed --compile --install-headers 'D:\Software\Anaconda\Include\csgo-demoparser' Check the logs for full command output.

I tried to solve the problems for a few days but got little progress, which made me upset. I use Python 3.6.8. I really need some help. (´・ω・`)

matiasjosecastro commented 4 years ago

Same Issue, cannot install. Have tried python 3.7.6, 3.8.1, and 3.5.2

Cashmereee commented 4 years ago

Same same. Have no clue

rabbit-ninja commented 4 years ago

I get this error:

ERROR: Command errored out with exit status 1: command: 'c:\program files\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\alanw\\AppData\\Local\\Temp\\pip-install-pjlll9ou\\csgo-demoparser\\setup.py'"'"'; __file__='"'"'C:\\Users\\alanw\\AppData\\Local\\Temp\\pip-install-pjlll9ou\\csgo-demoparser\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\alanw\AppData\Local\Temp\pip-record-k5jxtz4o\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\alanw\AppData\Roaming\Python\Python38\Include\csgo-demoparser' cwd: C:\Users\alanw\AppData\Local\Temp\pip-install-pjlll9ou\csgo-demoparser\ Complete output (47 lines): WARNING: The wheel package is not available. running install [pbr] Generating AUTHORS [pbr] AUTHORS complete (0.1s) running build running build_py Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Users\alanw\AppData\Local\Temp\pip-install-pjlll9ou\csgo-demoparser\setup.py", line 28, in <module> setup( File "C:\Users\alanw\AppData\Roaming\Python\Python38\site-packages\setuptools\__init__.py", line 161, in setup return distutils.core.setup(**attrs) File "c:\program files\python38\lib\distutils\core.py", line 148, in setup dist.run_commands() File "c:\program files\python38\lib\distutils\dist.py", line 966, in run_commands self.run_command(cmd) File "c:\program files\python38\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "c:\users\alanw\appdata\local\temp\pip-install-pjlll9ou\csgo-demoparser\.eggs\pbr-5.4.5-py3.8.egg\pbr\packaging.py", line 243, in run return du_install.install.run(self) File "c:\program files\python38\lib\distutils\command\install.py", line 545, in run self.run_command('build') File "c:\program files\python38\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "c:\program files\python38\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "c:\program files\python38\lib\distutils\command\build.py", line 135, in run self.run_command(cmd_name) File "c:\program files\python38\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "c:\program files\python38\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "C:\Users\alanw\AppData\Local\Temp\pip-install-pjlll9ou\csgo-demoparser\demoparser\_setup_hooks.py", line 21, in run self.protoc() File "C:\Users\alanw\AppData\Local\Temp\pip-install-pjlll9ou\csgo-demoparser\demoparser\_setup_hooks.py", line 12, in protoc subprocess.run([ File "c:\program files\python38\lib\subprocess.py", line 489, in run with Popen(*popenargs, **kwargs) as process: File "c:\program files\python38\lib\subprocess.py", line 854, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "c:\program files\python38\lib\subprocess.py", line 1247, in _execute_child args = list2cmdline(args) File "c:\program files\python38\lib\subprocess.py", line 549, in list2cmdline for arg in map(os.fsdecode, seq): File "c:\program files\python38\lib\os.py", line 818, in fsdecode filename = fspath(filename) # Does type-checking offilename`. TypeError: expected str, bytes or os.PathLike object, not NoneType

ERROR: Command errored out with exit status 1: 'c:\program files\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\alanw\AppData\Local\Temp\pip-install-pjlll9ou\csgo-demoparser\setup.py'"'"'; file='"'"'C:\Users\alanw\AppData\Local\Temp\pip-install-pjlll9ou\csgo-demoparser\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\alanw\AppData\Local\Temp\pip-record-k5jxtz4o\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\alanw\AppData\Roaming\Python\Python38\Include\csgo-demoparser' Check the logs for full command output.`

LeBesta commented 3 years ago

Has anyone managed to solve this in the meanwhile?

ltostes commented 3 years ago

Have you guys tried this fix? It worked for me

15 https://github.com/ibm-dev-incubator/demoparser/issues/15#issuecomment-592031678

sudo apt-get install protobuf-compiler