ERROR: Compilation failed. make: cython: Command not found

395 views
Skip to first unread message

Geoffrey Mégardon

unread,
Sep 30, 2016, 7:01:12 AM9/30/16
to ANNarchy
Hello!

I am not sure whether it is a problem related to ANNarchy or to my environment, but I receive this error when I run the neural_field example:

```
ANNarchy 4.5 (4.5.7) on linux2 (posix).
Compiling...
make: cython: Command not found
make: *** [all] Error 127
 
ERROR: Compilation failed.
  File "/home/c1248317/Bitbucket/annarchy/examples/neural_field/NeuralField.py", line 42, in <module>
    compile()
```


The weird part is that this same code was running ok yesterday morning...
I check in my terminal and it seems that 'make' and 'cython' are working.
Note that I am on CentOS and I have no admin rights.

Any idea?
If we find out that it is an issue with ANNarchy, I can open an issue on bitbucket instead.

thank you very much,

Julien Vitay

unread,
Sep 30, 2016, 7:10:38 AM9/30/16
to ANNarchy
Hi Geoffrey,

this is indeed weird. The only thing it says is that it does not find the cython executable. What gives "which cython" and "cython --version"?

Also, are you using annarchy directly, or do you have a virtual environment? Perhaps cython is not installed in the virtual environment, only globally.

Another thing: cython is used when installing ANNarchy (python setup install --user). Does that give an error too?

Best
Julien

Geoffrey Mégardon

unread,
Sep 30, 2016, 8:54:17 AM9/30/16
to ANNarchy
That gives me that:

bash-4.2$ which cython
/home/c1248317/MyApps/anaconda2/bin/cython
bash-4.2$ cython --version
Cython version 0.24.1


I installed ANNarchy by using the pip install method, and it installed it in my Anaconda folders.

Now, I just tried to install ANNarchy again using "python setup.py install --user" from the last ANNarchy repository I cloned yesterday.
It seems to work, although there are some warnings about numpy (see log file attached).

I finally uninstall manually and re-install ANNarchy through pip install.

Then I got the idea that it may be PyCharm who'se doing something wrong.
I run the 'python NeuralField.py' from a terminal and ...

 it work !!! houra!


... I mean, almost. It is now complaining that PyQtGraph is not installed. While it is!
 I checked that I was using the good python installation 9Anaconda) and that PyQtGraph was installed in it and everything seems fine.

$ which python
/home/c1248317/MyApps/anaconda2/bin/python

$ pip install PyQTGraph
Requirement already satisfied (use --upgrade to upgrade): PyQTGraph in /home/c1248317/MyApps/anaconda2/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): numpy in /home/c1248317/MyApps/anaconda2/lib/python2.7/site-packages (from PyQTGraph)


I guess that it is not related to this google group anymore, but any help is welcome. :D

log-ANNarchy.txt

Julien Vitay

unread,
Sep 30, 2016, 9:05:50 AM9/30/16
to ANNarchy
great that it works! although I am not sure why.. Was it only a problem with pycharm? I should install it to see where there is a problem.

The numpy warnings are not relevant, they are always there when you use numpy in cython.

For pyqtgraph, I think you also need python-opengl, the GUI for neuralfield uses opengl for the plot, but it is an optional dependency of pyqtgraph. You can try that in a python terminal:

import pyqtgraph
import pyqtgraph.opengl as gl

Depending on where is the error, you'll be sure. It is installable with pip install PyOpenGL, if I remember correctly.

Geoffrey Mégardon

unread,
Sep 30, 2016, 9:18:24 AM9/30/16
to ANNarchy
Ok so it seems that PyQTGraph requires PySide and PyQT4, and PySide seems to fail to install cause of a failed building wheel.

Interestingly, when I want to install PyQTGraph with Anaconda, it informs me that:

The following packages will be DOWNGRADED due to dependency conflicts:

    anaconda-navigator: 1.3.1-py27_0      --> 1.2.3-py27_0    
    matplotlib:         1.5.3-np111py27_0 --> 1.5.1-np111py27_0
    pyqt:               5.6.0-py27_0      --> 4.11.4-py27_4   
    qt:                 5.6.0-0           --> 4.8.7-4         
    qtconsole:          4.2.1-py27_1      --> 4.2.1-py27_0    
    spyder:             3.0.0-py27_0      --> 2.3.9-py27_1 
 


Thus, I conclude that maybe the example NeuralField.py may need to be updated to not use PyQTGraph :/ ??
So that ANNarchy users don't need to downgrade their library.
Alternatively, I guess the user could make a virtual environment with the downgraded libraries.

Concerning the problem with Pycharm, I still don't get it :/ as I said, it was working yesterday.
Even weirder, if I try 'python NeuralField.py from the terminal inside Pycharm, it gives me:

Traceback (most recent call last):
  File "NeuralField.py", line 4, in <module>
    from ANNarchy import *
ImportError: No module named ANNarchy

I think that I will just give up on trying understanding what Pycharm is doing.

Thank you for your help,

Julien Vitay

unread,
Sep 30, 2016, 9:30:13 AM9/30/16
to Geoffrey Mégardon, ANNarchy
I am pretty sure this anaconda problem will be soon solved, they are quite reactive, but perhaps it deserves a bug report by them.

We chose to use pyqtgraph because we wanted a real-time animation for the neural fields, and with matplotlib rendering takes much more time than simulating the network. But perhaps it is a good idea to make a offline demo.

for pycharm, it sounds like a pythonpath problem. Have you configured it to use the anaconda python, not the default one? 

--
You received this message because you are subscribed to the Google Groups "ANNarchy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to annarchy+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/annarchy/3f87822f-152e-458a-b332-9c3dfe28603c%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Professur für Künstliche Intelligenz
Fakultät für Informatik
Technische Universität Chemnitz, 09107 Chemnitz
(+49) 371 531-39468
julien...@informatik.tu-chemnitz.de
http://www.tu-chemnitz.de/~vitay/

Geoffrey Mégardon

unread,
Sep 30, 2016, 10:20:23 AM9/30/16
to ANNarchy, geoffrey...@gmail.com, julien...@informatik.tu-chemnitz.de
Yes I did configure PyCharm as it is shown in the link you sent me.

I believe that there is a difference between running the code from PyCharm GUI and from the bash terminal inside Pycharm.
I suspect that there is a bug from Pycharm on that, and that the Environment PATH are not given to the bash terminal open by Pycharm.

Anyway, from a normal terminal ANNarchy works, and from Atom, using Script, ANNarchy works too, as long as you give Atom the Environment PATH, which include the python libraries' path.

So that is a problem with my PyCharm. I will be using Atom now, instead.

Again thank you for your help!
Reply all
Reply to author
Forward
0 new messages