chrippa / python-librtmp

python-librtmp is a RTMP client library. It uses the implementation provided by librtmp via cffi.
BSD 2-Clause "Simplified" License
154 stars 33 forks source link

Installation fails #38

Open TheTomer opened 5 years ago

TheTomer commented 5 years ago

Hi, I'm trying to install librtmp on a python 3.5 environment with pip 19.1.1, but keep getting the following error, Any clue how to solve it?:

` ERROR: Complete output from command python setup.py egg_info: ERROR: cl : Command line error D8003 : missing source filename cl : Command line error D8003 : missing source filename cl : Command line error D8003 : missing source filename

    No working compiler found, or bogus compiler options passed to
    the compiler from Python's standard "distutils" module.  See
    the error messages above.  Likely, the problem is not related
    to CFFI but generic to the setup.py of any Python package that
    tries to compile C code.  (Hints: on OS/X 10.8, for errors about
    -mno-fused-madd see http://stackoverflow.com/questions/22313407/
    Otherwise, see https://wiki.python.org/moin/CompLangPython or
    the IRC channel #python on irc.freenode.net.)

    Trying to continue anyway.  If you are trying to install CFFI from
    a build done in a different context, you can ignore this warning.

Traceback (most recent call last):
  File "c:\users\user\appdata\local\programs\python\python35\lib\distutils\_msvccompiler.py", line 384, in compile
    self.spawn(args)
  File "c:\users\user\appdata\local\programs\python\python35\lib\distutils\_msvccompiler.py", line 503, in spawn
    return super().spawn(cmd)
  File "c:\users\user\appdata\local\programs\python\python35\lib\distutils\ccompiler.py", line 909, in spawn
    spawn(cmd, dry_run=self.dry_run)
  File "c:\users\user\appdata\local\programs\python\python35\lib\distutils\spawn.py", line 38, in spawn
    _spawn_nt(cmd, search_path, dry_run=dry_run)
  File "c:\users\user\appdata\local\programs\python\python35\lib\distutils\spawn.py", line 81, in _spawn_nt
    "command %r failed with exit status %d" % (cmd, rc))
distutils.errors.DistutilsExecError: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\user\appdata\local\programs\python\python35\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "c:\users\user\appdata\local\programs\python\python35\lib\distutils\dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "c:\users\user\appdata\local\programs\python\python35\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "c:\users\user\appdata\local\programs\python\python35\lib\site-packages\setuptools\command\bdist_egg.py", line 161, in run
    cmd = self.call_command('install_lib', warn_dir=0)
  File "c:\users\user\appdata\local\programs\python\python35\lib\site-packages\setuptools\command\bdist_egg.py", line 147, in call_command
    self.run_command(cmdname)
  File "c:\users\user\appdata\local\programs\python\python35\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "c:\users\user\appdata\local\programs\python\python35\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "c:\users\user\appdata\local\programs\python\python35\lib\site-packages\setuptools\command\install_lib.py", line 11, in run
    self.build()
  File "c:\users\user\appdata\local\programs\python\python35\lib\distutils\command\install_lib.py", line 107, in build
    self.run_command('build_ext')
  File "c:\users\user\appdata\local\programs\python\python35\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "c:\users\user\appdata\local\programs\python\python35\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "c:\users\user\appdata\local\programs\python\python35\lib\site-packages\setuptools\command\build_ext.py", line 75, in run
    _build_ext.run(self)
  File "c:\users\user\appdata\local\programs\python\python35\lib\distutils\command\build_ext.py", line 338, in run
    self.build_extensions()
  File "c:\users\user\appdata\local\programs\python\python35\lib\distutils\command\build_ext.py", line 447, in build_extensions
    self._build_extensions_serial()
  File "c:\users\user\appdata\local\programs\python\python35\lib\distutils\command\build_ext.py", line 472, in _build_extensions_serial
    self.build_extension(ext)
  File "c:\users\user\appdata\local\programs\python\python35\lib\site-packages\setuptools\command\build_ext.py", line 196, in build_extension
    _build_ext.build_extension(self, ext)
  File "c:\users\user\appdata\local\programs\python\python35\lib\distutils\command\build_ext.py", line 532, in build_extension
    depends=ext.depends)
  File "c:\users\user\appdata\local\programs\python\python35\lib\distutils\_msvccompiler.py", line 386, in compile
    raise CompileError(msg)
distutils.errors.CompileError: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\user\appdata\local\programs\python\python35\lib\site-packages\setuptools\sandbox.py", line 158, in save_modules
    yield saved
  File "c:\users\user\appdata\local\programs\python\python35\lib\site-packages\setuptools\sandbox.py", line 199, in setup_context
    yield
  File "c:\users\user\appdata\local\programs\python\python35\lib\site-packages\setuptools\sandbox.py", line 254, in run_setup
    _execfile(setup_script, ns)
  File "c:\users\user\appdata\local\programs\python\python35\lib\site-packages\setuptools\sandbox.py", line 48, in _execfile
    exec(code, globals, locals)
  File "C:\Users\user\AppData\Local\Temp\easy_install-8dx52k_5\cffi-1.12.3\setup.py", line 248, in <module>
  File "c:\users\user\appdata\local\programs\python\python35\lib\distutils\core.py", line 163, in setup
    raise SystemExit("error: " + str(msg))
SystemExit: error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\user\appdata\local\programs\python\python35\lib\site-packages\setuptools\command\easy_install.py", line 1105, in run_setup
    run_setup(setup_script, args)
  File "c:\users\user\appdata\local\programs\python\python35\lib\site-packages\setuptools\sandbox.py", line 257, in run_setup
    raise
  File "c:\users\user\appdata\local\programs\python\python35\lib\contextlib.py", line 77, in __exit__
    self.gen.throw(type, value, traceback)
  File "c:\users\user\appdata\local\programs\python\python35\lib\site-packages\setuptools\sandbox.py", line 199, in setup_context
    yield
  File "c:\users\user\appdata\local\programs\python\python35\lib\contextlib.py", line 77, in __exit__
    self.gen.throw(type, value, traceback)
  File "c:\users\user\appdata\local\programs\python\python35\lib\site-packages\setuptools\sandbox.py", line 170, in save_modules
    saved_exc.resume()
  File "c:\users\user\appdata\local\programs\python\python35\lib\site-packages\setuptools\sandbox.py", line 145, in resume
    six.reraise(type, exc, self._tb)
  File "c:\users\user\appdata\local\programs\python\python35\lib\site-packages\pkg_resources\_vendor\six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "c:\users\user\appdata\local\programs\python\python35\lib\site-packages\setuptools\sandbox.py", line 158, in save_modules
    yield saved
  File "c:\users\user\appdata\local\programs\python\python35\lib\site-packages\setuptools\sandbox.py", line 199, in setup_context
    yield
  File "c:\users\user\appdata\local\programs\python\python35\lib\site-packages\setuptools\sandbox.py", line 254, in run_setup
    _execfile(setup_script, ns)
  File "c:\users\user\appdata\local\programs\python\python35\lib\site-packages\setuptools\sandbox.py", line 48, in _execfile
    exec(code, globals, locals)
  File "C:\Users\user\AppData\Local\Temp\easy_install-8dx52k_5\cffi-1.12.3\setup.py", line 248, in <module>
  File "c:\users\user\appdata\local\programs\python\python35\lib\distutils\core.py", line 163, in setup
    raise SystemExit("error: " + str(msg))
SystemExit: error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\user\AppData\Local\Temp\pip-install-7p_gse2o\python-librtmp\setup.py", line 39, in <module>
    "Programming Language :: Python :: 3.4",
  File "c:\users\user\appdata\local\programs\python\python35\lib\distutils\core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "c:\users\user\appdata\local\programs\python\python35\lib\site-packages\setuptools\dist.py", line 320, in __init__
    self.fetch_build_eggs(attrs['setup_requires'])
  File "c:\users\user\appdata\local\programs\python\python35\lib\site-packages\setuptools\dist.py", line 377, in fetch_build_eggs
    replace_conflicting=True,
  File "c:\users\user\appdata\local\programs\python\python35\lib\site-packages\pkg_resources\__init__.py", line 852, in resolve
    dist = best[req.key] = env.best_match(req, ws, installer)
  File "c:\users\user\appdata\local\programs\python\python35\lib\site-packages\pkg_resources\__init__.py", line 1124, in best_match
    return self.obtain(req, installer)
  File "c:\users\user\appdata\local\programs\python\python35\lib\site-packages\pkg_resources\__init__.py", line 1136, in obtain
    return installer(requirement)
  File "c:\users\user\appdata\local\programs\python\python35\lib\site-packages\setuptools\dist.py", line 445, in fetch_build_egg
    return cmd.easy_install(req)
  File "c:\users\user\appdata\local\programs\python\python35\lib\site-packages\setuptools\command\easy_install.py", line 673, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "c:\users\user\appdata\local\programs\python\python35\lib\site-packages\setuptools\command\easy_install.py", line 699, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "c:\users\user\appdata\local\programs\python\python35\lib\site-packages\setuptools\command\easy_install.py", line 880, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "c:\users\user\appdata\local\programs\python\python35\lib\site-packages\setuptools\command\easy_install.py", line 1119, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "c:\users\user\appdata\local\programs\python\python35\lib\site-packages\setuptools\command\easy_install.py", line 1107, in run_setup
    raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
----------------------------------------

ERROR: Command "python setup.py egg_info" failed with error code 1 in C:\Users\user\AppData\Local\Temp\pip-install-7p_gse2o\python-librtmp`

p0932 commented 3 years ago

is there any solution on that in the meantime? I have the same issue.

KASDmusic commented 1 year ago

Did you install gcc and librtmp before ?