H
H
Hkdsk2019-01-17 09:31:59
Python
Hkdsk, 2019-01-17 09:31:59

Error while installing pythonnet module?

Error installing module, gave up and decided to look for help.
FileNotFoundError: [WinError 2] Cannot find the specified file

Collecting pythonnet
  Using cached https://files.pythonhosted.org/packages/89/3b/a22cd45b591d6cf490ee8b24d52b9db1f30b4b478b64a9b231c53474731e/pythonnet-2.3.0.tar.gz
Installing collected packages: pythonnet
  Running setup.py install for pythonnet: started
    Running setup.py install for pythonnet: finished with status 'error'
    Complete output from command C:\Users\Admin\PycharmProjects\test\venv\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Admin\\AppData\\Local\\Temp\\pycharm-packaging\\pythonnet\\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\Admin\AppData\Local\Temp\pip-record-fxzecy35\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\Admin\PycharmProjects\test\venv\include\site\python3.7\pythonnet:
    running install
    running build
    running build_ext
    Џа®ўҐаЄ  ®Ў­®ў«Ґ­Ё© Ё§ "https://www.nuget.org/api/v2/".
    ‘Ґ©з б § Їг饭 NuGet.exe 3.5.0.
    ЋЎ­®ў«Ґ­ЁҐ NuGet.exe ў 4.9.2.
    ЋЎ­®ў«Ґ­ЁҐ ўлЇ®«­Ґ­®.
    MSBuild auto-detection: using msbuild version '4.0' from 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319'.
    Restoring NuGet package NUnit.3.6.0.
    Restoring NuGet package NUnit.ConsoleRunner.3.6.0.
    Adding package 'NUnit.3.6.0' to folder 'C:\Users\Admin\AppData\Local\Temp\pycharm-packaging\pythonnet\packages'
    Adding package 'NUnit.ConsoleRunner.3.6.0' to folder 'C:\Users\Admin\AppData\Local\Temp\pycharm-packaging\pythonnet\packages'
    Added package 'NUnit.ConsoleRunner.3.6.0' to folder 'C:\Users\Admin\AppData\Local\Temp\pycharm-packaging\pythonnet\packages'
    Restoring NuGet package UnmanagedExports.1.2.7.
    Adding package 'UnmanagedExports.1.2.7' to folder 'C:\Users\Admin\AppData\Local\Temp\pycharm-packaging\pythonnet\packages'
    Added package 'NUnit.3.6.0' to folder 'C:\Users\Admin\AppData\Local\Temp\pycharm-packaging\pythonnet\packages'
    Added package 'UnmanagedExports.1.2.7' to folder 'C:\Users\Admin\AppData\Local\Temp\pycharm-packaging\pythonnet\packages'
    
    NuGet Config files used:
        C:\Users\Admin\AppData\Roaming\NuGet\NuGet.Config
    
    Feeds used:
        C:\Users\Admin\.nuget\packages\
        https://api.nuget.org/v3/index.json
    
    Installed:
        3 package(s) to packages.config projects
    Traceback (most recent call last):
      File "tools\geninterop\geninterop.py", line 292, in <module>
        sys.exit(main())
      File "tools\geninterop\geninterop.py", line 272, in main
        python_h = preprocess_python_headers()
      File "tools\geninterop\geninterop.py", line 192, in preprocess_python_headers
        for line in _check_output(cmd).splitlines():
      File "tools\geninterop\geninterop.py", line 41, in _check_output
        output = subprocess.check_output(*args, **kwargs)
      File "C:\Users\Admin\AppData\Local\Programs\Python\Python37-32\lib\subprocess.py", line 395, in check_output
        **kwargs).stdout
      File "C:\Users\Admin\AppData\Local\Programs\Python\Python37-32\lib\subprocess.py", line 472, in run
        with Popen(*popenargs, **kwargs) as process:
      File "C:\Users\Admin\AppData\Local\Programs\Python\Python37-32\lib\subprocess.py", line 775, in __init__
        restore_signals, start_new_session)
      File "C:\Users\Admin\AppData\Local\Programs\Python\Python37-32\lib\subprocess.py", line 1178, in _execute_child
        startupinfo)
    FileNotFoundError: [WinError 2] Не удается найти указанный файл
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\Admin\AppData\Local\Temp\pycharm-packaging\pythonnet\setup.py", line 405, in <module>
        zip_safe=False,
      File "C:\Users\Admin\PycharmProjects\test\venv\lib\site-packages\setuptools-39.1.0-py3.7.egg\setuptools\__init__.py", line 129, in setup
      File "C:\Users\Admin\AppData\Local\Programs\Python\Python37-32\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "C:\Users\Admin\AppData\Local\Programs\Python\Python37-32\lib\distutils\dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "C:\Users\Admin\AppData\Local\Programs\Python\Python37-32\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\Admin\PycharmProjects\test\venv\lib\site-packages\setuptools-39.1.0-py3.7.egg\setuptools\command\install.py", line 61, in run
      File "C:\Users\Admin\AppData\Local\Programs\Python\Python37-32\lib\distutils\command\install.py", line 545, in run
        self.run_command('build')
      File "C:\Users\Admin\AppData\Local\Programs\Python\Python37-32\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:\Users\Admin\AppData\Local\Programs\Python\Python37-32\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\Admin\AppData\Local\Programs\Python\Python37-32\lib\distutils\command\build.py", line 135, in run
        self.run_command(cmd_name)
      File "C:\Users\Admin\AppData\Local\Programs\Python\Python37-32\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:\Users\Admin\AppData\Local\Programs\Python\Python37-32\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\Admin\AppData\Local\Programs\Python\Python37-32\lib\distutils\command\build_ext.py", line 339, in run
        self.build_extensions()
      File "C:\Users\Admin\AppData\Local\Programs\Python\Python37-32\lib\distutils\command\build_ext.py", line 448, in build_extensions
        self._build_extensions_serial()
      File "C:\Users\Admin\AppData\Local\Programs\Python\Python37-32\lib\distutils\command\build_ext.py", line 473, in _build_extensions_serial
        self.build_extension(ext)
      File "C:\Users\Admin\AppData\Local\Temp\pycharm-packaging\pythonnet\setup.py", line 191, in build_extension
        subprocess.check_call([sys.executable, geninterop, interop_file])
      File "C:\Users\Admin\AppData\Local\Programs\Python\Python37-32\lib\subprocess.py", line 347, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['C:\\Users\\Admin\\PycharmProjects\\test\\venv\\Scripts\\python.exe', 'tools\\geninterop\\geninterop.py', 'src\\runtime\\interop37.cs']' returned non-zero exit status 1.
    
    ----------------------------------------

Command "C:\Users\Admin\PycharmProjects\test\venv\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Admin\\AppData\\Local\\Temp\\pycharm-packaging\\pythonnet\\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\Admin\AppData\Local\Temp\pip-record-fxzecy35\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\Admin\PycharmProjects\test\venv\include\site\python3.7\pythonnet" failed with error code 1 in C:\Users\Admin\AppData\Local\Temp\pycharm-packaging\pythonnet\

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andy_U, 2019-01-17
@Hkdsk

Grab the compiled whl from here .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question