Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows installation (cannot build subprocess32) #119

Closed
Tobey opened this issue Jun 12, 2016 · 4 comments
Closed

Windows installation (cannot build subprocess32) #119

Tobey opened this issue Jun 12, 2016 · 4 comments
Assignees
Labels
Milestone

Comments

@Tobey
Copy link

Tobey commented Jun 12, 2016

I am having issues installing on windows. Can a wheel be created for windows os that doesn't require subprocess32 (which is incompatible with windows). Will be good to test this.

Error message is listed below .

Building wheels for collected packages: subprocess32
  Running setup.py bdist_wheel for subprocess32 ... error
  Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\tobeya~1\\appdata\\local\\temp\\pip-build-    nwzk9d\\subprocess32\\setup.py';exec(compile(getattr(tokenize, 'open', open)   (__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d   c:\users\tobeya~1\appdata\local\temp\tmpcaj0oapip-wheel- --python-tag cp27:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-2.7
  copying subprocess32.py -> build\lib.win-amd64-2.7
  running build_ext
  building '_posixsubprocess' extension
  creating build\temp.win-amd64-2.7
  creating build\temp.win-amd64-2.7\Release
  C:\Users\TobeyAsinugo\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\python27\include -Ic:\python27\PC /Tc_posixsubprocess.c /Fobuild\temp.win-amd64-2.7\Release\_posixsubprocess.obj
  _posixsubprocess.c
  _posixsubprocess.c(10) : fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory
  error: command '"C:\Users\TobeyAsinugo\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe"' failed with exit status 2

  ----------------------------------------
  Failed building wheel for subprocess32
  Running setup.py clean for subprocess32
Failed to build subprocess32
Installing collected packages: subprocess32, hiredis, meld3, setuptools, supervisor, termcolor,     objgraph, ujson, mrq, Werkzeug, greenlet
  Found existing installation: subprocess32 3.2.7
    Uninstalling subprocess32-3.2.7:
      Successfully uninstalled subprocess32-3.2.7
  Running setup.py install for subprocess32 ... error
    Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\tobeya~1\\appdata\\local\\temp\\pip-build-nwzk9d\\subprocess32\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\tobeya~1\appdata\local\temp\pip-a3xvhl-record\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-2.7
    copying subprocess32.py -> build\lib.win-amd64-2.7
    running build_ext
    building '_posixsubprocess' extension
    creating build\temp.win-amd64-2.7
    creating build\temp.win-amd64-2.7\Release
    C:\Users\TobeyAsinugo\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\python27\include -Ic:\python27\PC /Tc_posixsubprocess.c /Fobuild\temp.win-amd64-2.7\Release\_posixsubprocess.obj
  _posixsubprocess.c
    _posixsubprocess.c(10) : fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory
    error: command '"C:\Users\TobeyAsinugo\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe"' failed with exit status 2

    ----------------------------------------
  Rolling back uninstall of subprocess32
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\tobeya~1\\appdata\\local\\temp\\pip-build-nwzk9d\\subprocess32\\setup.py';exec(compile(getattr(tokenize, 'open', open (__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\tobeya~1\appdata\local\temp\pip-a3xvhl-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\tobeya~1\appdata\local\temp\pip-build-nwzk9d\subprocess32\
@sylvinus
Copy link
Contributor

Hi @Tobey !

It seems that the latest subprocess32 should compile on Windows:
google/python-subprocess32#2

We rely on a flag (

["supervisord", "-c", path], start_new_session=True)
) that's not available in subprocess, so I'd recommend to test MRQ now again before we think about other workarounds.

Thanks!

@sylvinus sylvinus added the bug label Jul 29, 2016
@sylvinus
Copy link
Contributor

sylvinus commented Mar 2, 2018

We don't use this flag anymore in 0.9.x. Should we switch back to regular subprocess?

@sylvinus
Copy link
Contributor

sylvinus commented Mar 6, 2018

@Tobey turns out the process pools behave better with subprocess32, but it can definitely be considered optional. I've skipped the dependency on win32. Let me know how that works for you.

@sylvinus sylvinus closed this as completed Mar 6, 2018
@Tobey
Copy link
Author

Tobey commented Mar 6, 2018

@sylvinus ill let you know how i get on

NicoZivy added a commit that referenced this issue Mar 6, 2018
* origin/workshop:
  Update simple crawler exemple
  prevent new scheduled task with dailytime to run if dailytime already passed
  prints
  move worker orchestration code to a separate task
  fix cancel by worker + test
  Add scheduler exemple
  Merge tume@97e2a53
  Don't use absolute paths in dashboard
  Rename docker container, remove useless subprocess32 usages
  add exceptiontype in jobs tab
  filters in workers tab
  Don't build subprocess32 by default on windows. Fixes #119
  remove supervisord from doc
  Add warning when context.get_current_config is called before context.setup_context()

# Conflicts:
#	mrq/basetasks/utils.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants