GrahamDumpleton / wrapt

A Python module for decorators, wrappers and monkey patching.
BSD 2-Clause "Simplified" License
2.04k stars 230 forks source link

Windows, py3.7 installation fails #136

Closed antnieszka closed 5 years ago

antnieszka commented 5 years ago

Hello,

I was trying to setup a project and got this error:

(venv) X:\PycharmProjects\project>pip install wrapt
Collecting wrapt
  Using cached https://files.pythonhosted.org/packages/23/84/323c2415280bc4fc880ac5050dddfb3c8062c2552b34c2e512eb4aa68f79/wrapt-1.11.2.tar.gz
Installing collected packages: wrapt
  Running setup.py install for wrapt ... error
    ERROR: Complete output from command 'x:\pycharmprojects\project\venv\scripts\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\<user>\\AppData\\Local\\Temp\\pip-install-hf84m2f0\\wrapt\\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\<user>\AppData\Local\Temp\pip-record-hvx6qjy1\install-record.txt' --single-version-externally-managed --compile --install-headers 'x:\pycharmprojects\project\venv\include\site\python3.7\wrapt':
    ERROR: running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.7
    creating build\lib.win-amd64-3.7\wrapt
    copying src\wrapt\decorators.py -> build\lib.win-amd64-3.7\wrapt
    copying src\wrapt\importer.py -> build\lib.win-amd64-3.7\wrapt
    copying src\wrapt\wrappers.py -> build\lib.win-amd64-3.7\wrapt
    copying src\wrapt\__init__.py -> build\lib.win-amd64-3.7\wrapt
    running build_ext
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\<user>\AppData\Local\Temp\pip-install-hf84m2f0\wrapt\setup.py", line 101, in <module>
        run_setup(with_extensions=True)
      File "C:\Users\<user>\AppData\Local\Temp\pip-install-hf84m2f0\wrapt\setup.py", line 71, in run_setup
        setup(**setup_kwargs_tmp)
      File "C:\Python37\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "C:\Python37\lib\distutils\dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "C:\Python37\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "x:\pycharmprojects\project\venv\lib\site-packages\setuptools\command\install.py", line 61, in run
        return orig.install.run(self)
      File "C:\Python37\lib\distutils\command\install.py", line 545, in run
        self.run_command('build')
      File "C:\Python37\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:\Python37\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Python37\lib\distutils\command\build.py", line 135, in run
        self.run_command(cmd_name)
      File "C:\Python37\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:\Python37\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\<user>\AppData\Local\Temp\pip-install-hf84m2f0\wrapt\setup.py", line 25, in run
        build_ext.run(self)
      File "C:\Python37\lib\distutils\command\build_ext.py", line 308, in run
        force=self.force)
      File "C:\Python37\lib\distutils\ccompiler.py", line 1031, in new_compiler
        return klass(None, dry_run, force)
      File "C:\Python37\lib\distutils\cygwinccompiler.py", line 282, in __init__
        CygwinCCompiler.__init__ (self, verbose, dry_run, force)
      File "C:\Python37\lib\distutils\cygwinccompiler.py", line 126, in __init__
        if self.ld_version >= "2.10.90":
    TypeError: '>=' not supported between instances of 'NoneType' and 'str'
    ----------------------------------------

Additional info:

Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 23:09:28) [MSC v.1916 64 bit (AMD64)] on win32

pip 19.1.1 from x:\pycharmprojects\project\venv\lib\site-packages\pip (python 3.7)
GrahamDumpleton commented 5 years ago

It looks like your cygwin installation of Python is broken in not being able to compile Python packages which have a C extension component. Are you able to install other Python packages which have a C extension component?

I would also state that cygwin isn't really supported as an environment for installing mod_wsgi in that way and then running mod_wsgi-express start-server. It is highly unlikely to work and I don't recollect anyone ever getting it to work. Whether you can use pip install to at least build the module and then manually integrate it into an existing Apache installation I don't know.

antnieszka commented 5 years ago

Thanks for response. Other packages fail too. It seems my installation is just too messy 😉