Skip to content

Error Building wheel  #269

Closed
Closed

Description

@Lisa-V-Sau

Hi,

I am trying to install pythonnet using the following commands:
pip install pythonnet==2.1.0.dev1 - and with not luck since I am getting an error: Failed building wheel for pythonnet.

Can anyone help with this?

Just to be clear that I am using macOS.

Thanks.

Activity

  1. den-run-ai commented on Sep 27, 2016

    @den-run-ai
    Contributor

    @karbon62 can you paste full error from build process? You can use https://asciinema.org to record your command-line session.

    Also have a look at some additional instructions for OSX on this issue:

    #120

  2. Lisa-V-Sau commented on Sep 28, 2016

    @Lisa-V-Sau
    Author

    Hi denfromufa,

    Thanks for replying.

    The failure is shown below:

    Command "/usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;file='/private/var/folders/bm/kfjt11c544d9yz_cgvxwvzrm0000gn/T/pip-build-JnDwbB/pythonnet/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /var/folders/bm/kfjt11c544d9yz_cgvxwvzrm0000gn/T/pip-JqJLWX-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/bm/kfjt11c544d9yz_cgvxwvzrm0000gn/T/pip-build-JnDwbB/pythonnet/

    I've had a look at the ticket that you've mentioned to potentially resolve this. Its essentially a setyup.py script. I can try and see if that works. Though if you have a way to solve this or that there is an alternative to pythonnet I would gladly install that also.

    Thanks again,
    Lisa

  3. mateuszlewko commented on Sep 28, 2016

    @mateuszlewko

    Hi Lisa,
    Have tried running this command to get the exact error (possibly with sudo)?

    Mateusz

  4. Lisa-V-Sau commented on Sep 28, 2016

    @Lisa-V-Sau
    Author

    Hi Mateusz,

    The correct answer is that Im not sure if I am writing this into the terminal correctly.

    I've tried sudo "apt-get pythonnet==2.1.0.dev1" & "sudo installer pythonnet==2.1.0.dev1".

    Lisa

  5. mateuszlewko commented on Sep 28, 2016

    @mateuszlewko

    Sorry I meant the command that gives exit code 1, so:
    /usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;file='/private/var/folders/bm/kfjt11c544d9yz_cgvxwvzrm0000gn/T/pip-build-JnDwbB/pythonnet/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /var/folders/bm/kfjt11c544d9yz_cgvxwvzrm0000gn/T/pip-JqJLWX-record/install-record.txt --single-version-externally-managed --compile

  6. Lisa-V-Sau commented on Sep 28, 2016

    @Lisa-V-Sau
    Author

    ahh right, got you :) I used this:

    pip install pythonnet==2.1.0.dev1

    I've installed the setuptools & wheel also using pip.

    Lisa

  7. mateuszlewko commented on Sep 28, 2016

    @mateuszlewko

    Still not what I meant :P
    When you run pip install pythonnet==2.1.0.dev1 underneath it runs this command:
    /usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;file='/private/var/folders/bm/kfjt11c544d9yz_cgvxwvzrm0000gn/T/pip-build-JnDwbB/pythonnet/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /var/folders/bm/kfjt11c544d9yz_cgvxwvzrm0000gn/T/pip-JqJLWX-record/install-record.txt --single-version-externally-managed --compile

    But it fails, giving exit code 1.
    So I wanted you to copy this long command and paste it into terminal so we can see some additional info about this error (please paste it here).

    I had similar problem in the past and this approach helped me to find source of the problem.

    To sum up:

    1. Copy the long command I quoted in this post
    2. Paste it into terminal
    3. If if fails (and it should) try running this command with sudo
    4. Paste the output here

    Mateusz

  8. Lisa-V-Sau commented on Sep 28, 2016

    @Lisa-V-Sau
    Author

    So as I got it right, I've posted the initial post and copied it into terminal and ran it. Generating this:

    File "", line 1, in
    IOError: [Errno 2] No such file or directory: '/private/var/folders/bm/kfjt11c544d9yz_cgvxwvzrm0000gn/T/pip-build-JnDwbB/pythonnet/setup.py'

  9. den-run-ai commented on Sep 28, 2016

    @den-run-ai
    Contributor

    also try run from latest pip package: "[sudo] pip install pythonnet --pre
    -U" or straight from latest source on github (assuming you have git
    installed) "pip install git+https://github.com/pythonnet/pythonnet -U"

    Note that I marked [sudo] optional.

    Before running these commands you need to make sure that all dependencies
    are installed: python (2.7, 3.3, 3.4, or 3.5), mono (brew installed mono),
    pip, six, wheels, pycparser, clang.

    Finally you are not pasting full session from your terminal (only last part
    of it), I insist on recording using asciinema or pasting full terminal
    session here.

  10. den-run-ai commented on Sep 28, 2016

    @den-run-ai
    Contributor

    actually sudo is not optional - it is required!

  11. Lisa-V-Sau commented on Sep 28, 2016

    @Lisa-V-Sau
    Author

    Hi,

    I've tried the methods but unfortunately Im still getting the same issue. :'(

    Thanks,
    Lisa

  12. Lisa-V-Sau commented on Sep 28, 2016

    @Lisa-V-Sau
    Author

    Also tried with Sudo. It started downloading which seemed at first promising but then it just failed, giving the same error :(

  13. den-run-ai commented on Sep 28, 2016

    @den-run-ai
    Contributor

    Well @karbon62, without console (terminal) output we cannot help you much.
    The only thing you can do at this point is wait for Mac OS wheels that I'm
    preparing for OSX using Travis CI. I do not even have Mac OSX, although
    some of my colleagues have.

    Also others who successfully build wheels locally for OSX can provide them
    to you privately and post here. Note that these are highly OS/Python/Mono
    version specific binary wheels.

  14. kdesimone commented on Dec 14, 2016

    @kdesimone

    Any update here?

  15. den-run-ai commented on Dec 14, 2016

    @den-run-ai
    Contributor

    @kdesimone what kind of update are you expecting?

  16. kdesimone commented on Dec 14, 2016

    @kdesimone

    I'm having same problem, different package. Wondering how he resolved it.

  17. luketg8 commented on Jan 11, 2017

    @luketg8

    @kdesimone I had the same issue, but then ran 'sudo -H pip2.7 install pythonnet' and fixed it, it seemed to be due to me having 2 different versions of pip (2.7 and 3.5) and the former not having access to the caching wheels

  18. kdesimone commented on Jan 11, 2017

    @kdesimone
  19. luketg8 commented on Jan 11, 2017

    @luketg8

    Hope it worked for you too!

  20. vmuriart commented on Jan 30, 2017

    @vmuriart
    Contributor

    We released 2.2.2 yesterday, I would suggest trying that one since it fixed a couple packaging issues

  21. den-run-ai commented on Jan 30, 2017

    @den-run-ai
    Contributor

    @vmuriart i'm not done with my osx branch yet. it may still require manual intervention. will have to rent some VM to do more manual testing: http://www.macincloud.com/

  22. added this to the 2.3.0 milestone on Feb 2, 2017
  23. self-assigned this
    on Feb 2, 2017
  24. vmuriart commented on Mar 3, 2017

    @vmuriart
    Contributor

    I think this is solved. Based on the feedback during the troubleshooting of #392 alot of the quirks during setup have been sorted out on the latest master branch.

    If the issue persists let us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions