Jump to content

Cura, MAC OS X, Sources Compil


low

Recommended Posts

Posted · Cura, MAC OS X, Sources Compil

Hi guys !

I jute wanna build Cura form https://github.com/daid/Cura , for Mac OS X, but really i spend so much time to try it.

But it's still don't work...

When i build it form my shell and my env on a MAC, i can build something, but the application don't work...

I should use virtualenv ?

( I have no problems to build on Windows, and Linux, but Mac... :'( )

Thanks ;)

 

  • Link to post
    Share on other sites

    Posted · Cura, MAC OS X, Sources Compil

    Building Cura for MacOS is a hell. And yes, you should use virtualenv to setup a proper python environment.

    I'm pretty much glad it works right now. And I do not touch that mac for anything else but building Cura releases. That's how tricky I find that setup.

     

  • Link to post
    Share on other sites

    Posted · Cura, MAC OS X, Sources Compil

    Raaah !!! It's don't works at all :'(

    It think a did everything well like you explain here : https://github.com/daid/Cura , but it still don't work...

    When i try to did that :

    $ pip install -r requirements_darwin.txt

    At the end he give me an error :

    $ Command python setup.py egg_ingo failed with error code 1 in /Users/...

    Any ideas ? :'(

     

  • Link to post
    Share on other sites

    Posted · Cura, MAC OS X, Sources Compil

    Ok thanks but a last question :p if you are ok,

    Here, i'm ok with that commands :

    $ python -c "import sys; print sys.prefix" should not start with"/System/Library/Frameworks/Python.framework/".

    $ python -c "import distutils.sysconfig as c; print(c.get_config_var('PYTHONFRAMEWORK'))" should be non-empty string. E.g. Python.

    $ lipo -info `which python` should include both i386 and x86_64. E.g"Architectures in the fat file: /usr/local/bin/python are: i386 x86_64".

    $ otool -l `which python` should contain "cmd LC_VERSION_MIN_MACOSX ... version 10.6".

    But this one give me version 10.9

    You thinks that can be a problem ?

     

  • Link to post
    Share on other sites

    Posted · Cura, MAC OS X, Sources Compil

    $ otool -l `which python` should contain "cmd LC_VERSION_MIN_MACOSX ... version 10.6".

    But this one give me version 10.9

    You thinks that can be a problem ?

     

    It is not a problem as long as you don't try to run it on another OSX version (it won't run on the Leopards/Lions)

    I am trying to build Cura on my machine (Mavericks as well), I'll post the outcome ;)

     

  • Link to post
    Share on other sites

    Posted · Cura, MAC OS X, Sources Compil

    Ho god @Amedee, i'm very interesting by your return ;) <3 Thx a lot ! ;)

     

  • Link to post
    Share on other sites

    Posted · Cura, MAC OS X, Sources Compil

    After scratching my head many hours I have something...

    The first issue is that pyobjc 3.0.1 does not compile under Mavericks. This is a known issue described https://bitbucket.org/ronaldoussoren/pyobjc/issue/92/failed-to-install-pyobjc-301-with-pip-on.

    There is an easy workaround, if you just comment out pyobjc-framework-GameKit in setup.py it will go through (actually you need to remove pyobjc-framework-Message and pyobjc-framework-ServerNotification as well)

    But...

    ... I can't get 'power' working with pyobjc 3.0.1 :oops:

    I don't see anything wrong in the power library. Out of ideas I then decided to install the last 2.x version of pyobjc which is 2.5.1

    But of course it won't install with the latest version of setuptools, so you have to downgrade setuptools as well :eek:

    Having done that the tests.py from the power library are passing and believe it or not Cura runs as well :idea:

    So to summarize (in virtualenv):

     

    • pip uninstall setuptools
    • pip install 'setuptools<3.5'
    • pip install pyobjc==2.5.1

    With that you should be good to go to run Cura.

    I don't think package.sh will work though, when I tried last week I had to tweak a couple of other files to get it running, so I believe we need to change a couple of other 'versions' (modulegraph, macholib and py2app) to be able to package.

    I'll investigate that when I have more time, but I am already posting this, because I know Aurélien is waiting on it ;)

    @Daid -- just curious -- could you give us a 'pip list' from your Mac so that we can see which package versions you have? After all it might be just easy as installing the exact same versions...

     

  • Link to post
    Share on other sites

    Posted · Cura, MAC OS X, Sources Compil

    @Daid -- just curious -- could you give us a 'pip list' from your Mac so that we can see which package versions you have? After all it might be just easy as installing the exact same versions...

     

    Any idea how to list that?

    I've packed up and stored my virtual environment at: http://software.ultimaker.com/virtualenv.tgz

    Maybe that helps?

     

  • Link to post
    Share on other sites

    Posted · Cura, MAC OS X, Sources Compil

    Any idea how to list that?

     

    Just type 'pip list' in a terminal.

     

  • Link to post
    Share on other sites

    Posted · Cura, MAC OS X, Sources Compil

    Just type 'pip list' in a terminal.

     

    Gives a "list is not a command" as reply.

    ultimakers-Mac-mini:~ ultimaker$ pip list

    Usage: pip COMMAND [OPTIONS]

    No command by the name pip list

    (maybe you meant "pip install list")

     

  • Link to post
    Share on other sites

    Posted · Cura, MAC OS X, Sources Compil

     

     


    (Cura)ultimakers-Mac-mini:~ ultimaker$ pip freeze
    -e git://github.com/GreatFruitOmsk/Power.git@2cfe611348d84512a1590840a7e0d24bec1 d1d93#egg=Power-dev
    PyOpenGL==3.0.2
    altgraph==0.10.1
    macholib==1.5
    modulegraph==0.10.2
    numpy==1.6.2
    py2app==0.7.2
    pyobjc-core==2.5.0b1
    pyobjc-framework-Accounts==2.5.0b1
    pyobjc-framework-AddressBook==2.5.0b1
    pyobjc-framework-AppleScriptKit==2.5.0b1
    pyobjc-framework-AppleScriptObjC==2.5.0b1
    pyobjc-framework-Automator==2.5.0b1
    pyobjc-framework-CFNetwork==2.5.0b1
    pyobjc-framework-CalendarStore==2.5.0b1
    pyobjc-framework-Cocoa==2.5.0b1
    pyobjc-framework-Collaboration==2.5.0b1
    pyobjc-framework-CoreData==2.5.0b1
    pyobjc-framework-CoreLocation==2.5.0b1
    pyobjc-framework-CoreText==2.5.0b1
    pyobjc-framework-DictionaryServices==2.5.0b1
    pyobjc-framework-EventKit==2.5.0b1
    pyobjc-framework-ExceptionHandling==2.5.0b1
    pyobjc-framework-FSEvents==2.5.0b1
    pyobjc-framework-InputMethodKit==2.5.0b1
    pyobjc-framework-InstallerPlugins==2.5.0b1
    pyobjc-framework-InstantMessage==2.5.0b1
    pyobjc-framework-LatentSemanticMapping==2.5.0b1
    pyobjc-framework-LaunchServices==2.5.0b1
    pyobjc-framework-Message==2.5.0b1
    pyobjc-framework-OpenDirectory==2.5.0b1
    pyobjc-framework-PreferencePanes==2.5.0b1
    pyobjc-framework-PubSub==2.5.0b1
    pyobjc-framework-QTKit==2.5.0b1
    pyobjc-framework-Quartz==2.5.0b1
    pyobjc-framework-ScreenSaver==2.5.0b1
    pyobjc-framework-ScriptingBridge==2.5.0b1
    pyobjc-framework-SearchKit==2.5.0b1
    pyobjc-framework-ServerNotification==2.5.0b1
    pyobjc-framework-ServiceManagement==2.5.0b1
    pyobjc-framework-Social==2.5.0b1
    pyobjc-framework-SyncServices==2.5.0b1
    pyobjc-framework-SystemConfiguration==2.5.0b1
    pyobjc-framework-WebKit==2.5.0b1
    pyserial==2.6
    wsgiref==0.1.2
    wxPython==2.9.4.0

     

  • Link to post
    Share on other sites

    Posted · Cura, MAC OS X, Sources Compil

    Daid, you really have old stuff if your pip does not support the list command ;)

    (but don't upgrade, it might (and will) break something :p )

    But 'pip freeze' should work as Aurélien mentioned...

    [Edit] Cross posted -- thank you for the list, it will definitely help

    For pyobc and setuptools,I already posted the 'max versions'.

    For modulegraph, anything <=0.12 should work (==0.11.1)

    Still need to look at MaxhOLib and py2app -- but as I said you only need these for packaging, not for running Cura.

     

  • Link to post
    Share on other sites

    Posted · Cura, MAC OS X, Sources Compil

    Just went through the whole process again.

    Here are the packages version you need to get Cura packaged (and running) properly under Maveriks:

     


    setuptools<3.5 (Needed for pyobj 2.5.1)
    altgraph==0.11 (need for modulegraph 0.11.x)
    modulegraph==0.11.1 (py2app is not compatible with 0.12)
    macholib==1.5.1 (1.6 seems broken, 1.7 not compatible with py2app)
    numpy==1.7.2 (Error with higher versions)
    pyobjc==2.5.1 (3.x won't work with power)
    py2app==0.8.1 (0.9 won't work with the above)

    It is a bit a domino game, trying to upgrade any of the above with a later version forces the others to upgrade until you end up with something that does not work ;)

    Note that it is possible to run with more recent versions if you start to hack the modules (parameter name, etc), but I wanted to get something running without hacking...

     

  • Link to post
    Share on other sites

    Posted · Cura, MAC OS X, Sources Compil

    Amedee,

    which pip version are you using.

    thanks

     

  • Link to post
    Share on other sites

    Posted · Cura, MAC OS X, Sources Compil

    I am using the pip from my 'non-system' python.

    To be 100% correct it is the pip from the virtualenv:

     


    imac:~ pvanhaes$ workon Cura
    (Cura)imac:~ pvanhaes$ which pip
    /Users/pvanhaes/.virtualenvs/Cura/bin/pip

    But initially coming from my 'non-system' python environment when the virtualenv was created...

     


    imac:~ pvanhaes$ which pip
    /opt/local/bin/pip
    imac:~ pvanhaes$ pip --version
    pip 1.5.6 from /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (python 2.7)

    A couple of points to consider...

    The mkvirtualenv command will by default install setuptools 3.6 which is incompatible with pyobj 2.5.1, so you need to downgrade to setuptools<3.5 (See list in #15)

    The PATHs in this post will differ for you if you are using Homebrew (If my memory serves well Homebrew uses /usr/local by default). I am not using Homebrew, I use MacPorts. It should not make any difference and I don't have anything against Homebrew, it is just that I have MacPorts already setup on my Macs.

    In case somebody is interested, here are some incantations needed to get your virtualenv setup with MacPorts:

    For python:

     


    $ sudo port install python27 +universal
    $ sudo port select --set python python27
    $ sudo port install py27-pip +universal
    $ sudo port select --set pip pip27

    For virtualenv:

     


    $ sudo pip install virtualenv
    $ sudo pip install virtualenvwrapper
    $ export PATH=$PATH:/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin
    $ source /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/virtualenvwrapper.sh
    $ mkvirtualenv Cura

     

  • Link to post
    Share on other sites

    Posted · Cura, MAC OS X, Sources Compil

    The issue with power and pyobjc was fixed here for more info.

    This is my pip list in my virtual environment:

     


    PyOpenGL==3.1.0
    altgraph==0.12
    macholib==1.7
    modulegraph==0.12
    numpy==1.9.1
    power==1.3
    py2app==0.9
    pyobjc==3.0.4
    pyobjc-core==3.0.4
    pyobjc-framework-Accounts==3.0.4
    pyobjc-framework-AddressBook==3.0.4
    pyobjc-framework-AppleScriptKit==3.0.4
    pyobjc-framework-AppleScriptObjC==3.0.4
    pyobjc-framework-Automator==3.0.4
    pyobjc-framework-CFNetwork==3.0.4
    pyobjc-framework-CalendarStore==3.0.4
    pyobjc-framework-Cocoa==3.0.4
    pyobjc-framework-Collaboration==3.0.4
    pyobjc-framework-CoreData==3.0.4
    pyobjc-framework-CoreLocation==3.0.4
    pyobjc-framework-CoreText==3.0.4
    pyobjc-framework-CoreWLAN==3.0.4
    pyobjc-framework-DictionaryServices==3.0.4
    pyobjc-framework-DiskArbitration==3.0.4
    pyobjc-framework-EventKit==3.0.4
    pyobjc-framework-ExceptionHandling==3.0.4
    pyobjc-framework-FSEvents==3.0.4
    pyobjc-framework-InputMethodKit==3.0.4
    pyobjc-framework-InstallerPlugins==3.0.4
    pyobjc-framework-InstantMessage==3.0.4
    pyobjc-framework-LatentSemanticMapping==3.0.4
    pyobjc-framework-LaunchServices==3.0.4
    pyobjc-framework-PreferencePanes==3.0.4
    pyobjc-framework-PubSub==3.0.4
    pyobjc-framework-QTKit==3.0.4
    pyobjc-framework-Quartz==3.0.4
    pyobjc-framework-ScreenSaver==3.0.4
    pyobjc-framework-ScriptingBridge==3.0.4
    pyobjc-framework-SearchKit==3.0.4
    pyobjc-framework-ServiceManagement==3.0.4
    pyobjc-framework-Social==3.0.4
    pyobjc-framework-StoreKit==3.0.4
    pyobjc-framework-SyncServices==3.0.4
    pyobjc-framework-SystemConfiguration==3.0.4
    pyobjc-framework-WebKit==3.0.4
    pyserial==2.7
    wsgiref==0.1.2
    wxPython==3.0.1.1
    wxPython-common==3.0.1.1

    wxpython and power had to be installed manually, but everything else was installed with pip. py2app had to be corrected, but other than that, you're good. This is what I used to build wxpython:

     


    python build-wxpython.py --osx_cocoa --mac_arch=i386,x86_64 --install

     

  • Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    • Our picks

      • UltiMaker Cura 5.8 Stable released 🎉
        In the Cura 5.8 stable release, everyone can now tune their Z seams to look better than ever. Method series users get access to new material profiles, and the base Method model now has a printer profile, meaning the whole Method series is now supported in Cura!
        • 5 replies
      • Introducing the UltiMaker Factor 4
        We are happy to announce the next evolution in the UltiMaker 3D printer lineup: the UltiMaker Factor 4 industrial-grade 3D printer, designed to take manufacturing to new levels of efficiency and reliability. Factor 4 is an end-to-end 3D printing solution for light industrial applications
          • Thanks
          • Like
        • 3 replies
    ×
    ×
    • Create New...