D
D
Dmitry Fondomakin2016-09-19 10:26:07
Python
Dmitry Fondomakin, 2016-09-19 10:26:07

How to solve FreeSWITCH-ESL-Python installation problem on Windows?

Hello.
There was a problem installing FreeSWITCH-ESL-Python on Windows Server 2016 x64 (Trial).
Error log

Collecting FreeSWITCH-ESL-Python
  Using cached FreeSWITCH-ESL-Python-1.2.tar.gz
Installing collected packages: FreeSWITCH-ESL-Python
  Running setup.py install for FreeSWITCH-ESL-Python: started
    Running setup.py install for FreeSWITCH-ESL-Python: finished with status 'error'
    Complete output from command C:\Python27\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\\xc0\xe4\xec\xe8\xed\xe8\xf1\xf2\xf0\xe0\xf2\xee\xf0\\AppData\\Local\\Temp\\pycharm-packaging\\FreeSWITCH-ESL-Python\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\836d~1\appdata\local\temp\pip-3a70cz-record\install-record.txt --single-version-externally-managed --compile:
    C:\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'pymodules'
      warnings.warn(msg)
    running install
    running build
    running build_py
    creating build
    creating build\lib.win32-2.7
    creating build\lib.win32-2.7\freeswitchESL
    copying freeswitchESL\ESL.py -> build\lib.win32-2.7\freeswitchESL
    copying freeswitchESL\__init__.py -> build\lib.win32-2.7\freeswitchESL
    warning: build_py: byte-compiling is disabled, skipping.
    
    running build_ext
    building '_ESL' extension
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\Администратор\AppData\Local\Temp\pycharm-packaging\FreeSWITCH-ESL-Python\setup.py", line 22, in <module>
        description = 'Standalone FreeSWITCH ESL Python module.',)
      File "C:\Python27\lib\distutils\core.py", line 151, in setup
        dist.run_commands()
      File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
        cmd_obj.run()
      File "C:\Python27\lib\site-packages\setuptools\command\install.py", line 61, in run
        return orig.install.run(self)
      File "C:\Python27\lib\distutils\command\install.py", line 563, in run
        self.run_command('build')
      File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
        self.distribution.run_command(command)
      File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
        cmd_obj.run()
      File "C:\Python27\lib\distutils\command\build.py", line 127, in run
        self.run_command(cmd_name)
      File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
        self.distribution.run_command(command)
      File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
        cmd_obj.run()
      File "C:\Python27\lib\site-packages\setuptools\command\build_ext.py", line 49, in run
        _build_ext.run(self)
      File "C:\Python27\lib\distutils\command\build_ext.py", line 339, in run
        self.build_extensions()
      File "C:\Python27\lib\distutils\command\build_ext.py", line 448, in build_extensions
        self.build_extension(ext)
      File "C:\Python27\lib\site-packages\setuptools\command\build_ext.py", line 174, in build_extension
        _build_ext.build_extension(self, ext)
      File "C:\Python27\lib\distutils\command\build_ext.py", line 498, in build_extension
        depends=ext.depends)
      File "C:\Python27\lib\distutils\msvc9compiler.py", line 473, in compile
        self.initialize()
      File "C:\Python27\lib\distutils\msvc9compiler.py", line 383, in initialize
        vc_env = query_vcvarsall(VERSION, plat_spec)
      File "C:\Python27\lib\site-packages\setuptools\msvc9_support.py", line 52, in query_vcvarsall
        return unpatched['query_vcvarsall'](version, *args, **kwargs)
      File "C:\Python27\lib\distutils\msvc9compiler.py", line 275, in query_vcvarsall
        stderr=subprocess.PIPE)
      File "C:\Python27\lib\subprocess.py", line 711, in __init__
        errread, errwrite)
      File "C:\Python27\lib\subprocess.py", line 959, in _execute_child
        startupinfo)
    UnicodeEncodeError: 'ascii' codec can't encode characters in position 10-22: ordinal not in range(128)
    
    ----------------------------------------

Command "C:\Python27\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\\xc0\xe4\xec\xe8\xed\xe8\xf1\xf2\xf0\xe0\xf2\xee\xf0\\AppData\\Local\\Temp\\pycharm-packaging\\FreeSWITCH-ESL-Python\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\836d~1\appdata\local\temp\pip-3a70cz-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Администратор\AppData\Local\Temp\pycharm-packaging\FreeSWITCH-ESL-Python\
You are using pip version 8.1.1, however version 8.1.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

Google is giving you bad advice. Or am I approaching the issue from the wrong side.
3cffedaba86042ed92e15b94c7fbff0c.png
The C compiler for Python 2 is installed. If you need additional information - ready to answer any question.
UPD: I'll clarify the question - I know how to deal with encoding in my scripts. Here, problems got out when installing the FreeSWITCH-ESL-Python library on Windows Server 2016 x64 (Win10 / Win7 - similar problems). Editing the library itself seems wrong to me. Maybe there are other solutions?
UPD1: On Python 3, the error log is like this.
Collecting FreeSWITCH-ESL-Python
  Using cached FreeSWITCH-ESL-Python-1.2.tar.gz
Installing collected packages: FreeSWITCH-ESL-Python
  Running setup.py install for FreeSWITCH-ESL-Python: started
    Running setup.py install for FreeSWITCH-ESL-Python: finished with status 'error'
    Complete output from command "C:\Program Files (x86)\Python3\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\Администратор\\AppData\\Local\\Temp\\pycharm-packaging\\FreeSWITCH-ESL-Python\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\836D~1\AppData\Local\Temp\pip-ctzhgy3p-record\install-record.txt --single-version-externally-managed --compile:
    C:\Program Files (x86)\Python3\lib\distutils\dist.py:261: UserWarning: Unknown distribution option: 'pymodules'
      warnings.warn(msg)
    running install
    running build
    running build_py
    creating build
    creating build\lib.win32-3.5
    creating build\lib.win32-3.5\freeswitchESL
    copying freeswitchESL\ESL.py -> build\lib.win32-3.5\freeswitchESL
    copying freeswitchESL\__init__.py -> build\lib.win32-3.5\freeswitchESL
    warning: build_py: byte-compiling is disabled, skipping.
    
    running build_ext
    building '_ESL' extension
    creating build\temp.win32-3.5
    creating build\temp.win32-3.5\Release
    creating build\temp.win32-3.5\Release\swig
    creating build\temp.win32-3.5\Release\src
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I/include/ "-IC:\Program Files (x86)\Python3\include" "-IC:\Program Files (x86)\Python3\include" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /EHsc /Tpswig/esl_wrap.cpp /Fobuild\temp.win32-3.5\Release\swig/esl_wrap.obj
    esl_wrap.cpp
    swig/esl_wrap.cpp(3050): fatal error C1083: Cannot open include file: 'esl.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2
    
    ----------------------------------------

Command ""C:\Program Files (x86)\Python3\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\Администратор\\AppData\\Local\\Temp\\pycharm-packaging\\FreeSWITCH-ESL-Python\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\836D~1\AppData\Local\Temp\pip-ctzhgy3p-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Администратор\AppData\Local\Temp\pycharm-packaging\FreeSWITCH-ESL-Python\
You are using pip version 8.1.1, however version 8.1.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

Upgrading pip to 8.1.2 will not change the situation.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question