compiler error in anaconda qutip

87 views
Skip to first unread message

Casey Fitzpatrick

unread,
Dec 18, 2015, 6:57:46 PM12/18/15
to QuTiP: Quantum Toolbox in Python
Hi, I hope I'm handling this correctly, as I'm new to qutip ...

I've been trying to set up qutip within my anaconda distribution using 

    conda install -c https://conda.anaconda.org/jrjohansson qutip


The package linking completes with no errors. But when I 

    import qutip


I get the following

    ImportError: Building module qutip.cy.spmatfuncs failed:
   
["CompileError: command 'gcc' failed with exit status 1\n"]


After running
    
    conda update gcc
    conda update cython


I get the same error.

I am running OS X 10.11.1. I attached terminal output in case it's useful.

I'm really looking forward to using this software for thesis work, so I hope to get resolved ASAP! Thanks for reading.
Terminal Saved Output.txt

Casey Fitzpatrick

unread,
Dec 18, 2015, 8:44:25 PM12/18/15
to QuTiP: Quantum Toolbox in Python
RESOLVED.

First, I changed to a source install inside the anaconda site-packages folder instead of pulling from the site. I was still getting the error, but I found this similar issue, which suggested I remove the fpmath calls in a couple of the c compiler setup.py files. In particular, the setups in the cy and control subdirectories (see links). For instance, something like 

            extra_compile_args=['-w', '-ffast-math',
                               
'-O3', '-march=native, '-mfpmath=sse']


to

            extra_compile_args=['-w', '-ffast-math',
                               
'-O3', '-march=native'], #, '-mfpmath=sse'


For some reason, this wasn't working either, so I decided to try changing
-march=native

to
 -march=x86-64

, and that did the trick!

c.alanfi...@gmail.com

unread,
Dec 20, 2015, 7:26:49 AM12/20/15
to QuTiP: Quantum Toolbox in Python
Hi, I hope I'm handling this correctly, as I'm new to qutip... 

I've been trying to set up qutip within my anaconda distribution using 

    conda install -c https://conda.anaconda.org/jrjohansson qutip


The package linking completes with no errors. But when I 

    import qutip


I get the following

    ImportError: Building module qutip.cy.spmatfuncs failed:
   
["CompileError: command 'gcc' failed with exit status 1\n"]


After running
    
    conda update gcc
    conda update cython



I get the same error.

I am running OS X 10.11.1. My terminal output is attached, in case that would be useful.
Terminal Saved Output.txt

Alex Pitchford

unread,
Feb 9, 2016, 8:26:17 PM2/9/16
to QuTiP: Quantum Toolbox in Python
Hi, its not clear whether you have solved your install problem now.
The same issue is on the Github, and I think we are about to merge a fix.
Reply all
Reply to author
Forward
0 new messages