Sorry I made a mistake, in the last line of the table (why do I always see them only just
after sending the mail?!!)
Python config
|
Python command
|
Pure python
|
EASE (Py4J)
|
3.5.2 + numpy 1.14.5 (installed with pip)
|
import numpy as np
|
OK
|
KO (freeze)
|
3.5.2 + numpy 1.14.5 (installed with pip)
|
help(“modules”)
|
OK
|
KO (freeze)
|
3.6.5 + numpy 1.14.5 (installed with pip)
|
import numpy as np
|
OK
|
KO (freeze)
|
3.6.5 + numpy 1.14.5 (installed with pip)
|
help(“modules”)
|
OK
|
KO (freeze)
|
Anaconda 5.2.0 ( python 3.6.5 + 1.14.5)
|
import numpy as np
|
OK
|
OK!!
|
Anaconda 5.2.0 ( python 3.6.5 + 1.14.5)
|
help(“modules”)
|
OK
|
KO (freeze)
|
De : ease-dev-bounces@xxxxxxxxxxx <ease-dev-bounces@xxxxxxxxxxx>
De la part de REVOL Sébastien
Envoyé : lundi 2 juillet 2018 15:52
À : ease developer discussions <ease-dev@xxxxxxxxxxx>
Objet : [PROVENANCE INTERNET] Re: [ease-dev] numpy in EASE
Hi Guys,
Just to provide my inputs. Using EASE nightly, on windows 7 I have the following results :
Python config
|
Python command
|
Pure python
|
EASE (Py4J)
|
3.5.2 + numpy 1.14.5 (installed with pip)
|
import numpy as np
|
OK
|
KO (freeze)
|
3.5.2 + numpy 1.14.5 (installed with pip)
|
help(“modules”)
|
OK
|
KO (freeze)
|
3.6.5 + numpy 1.14.5 (installed with pip)
|
import numpy as np
|
OK
|
KO (freeze)
|
3.6.5 + numpy 1.14.5 (installed with pip)
|
help(“modules”)
|
OK
|
KO (freeze)
|
Anaconda 5.2.0 ( python 3.6.5 + 1.14.5)
|
import numpy as np
|
OK
|
OK!!
|
Anaconda 5.2.0 ( python 3.6.5 + 1.14.5)
|
import numpy as np
|
OK
|
KO (freeze)
|
I made several tests to manually reproduce what is done be EASE/Py4J when starting a python script (start python in a separate process with “-u” argument, append py4J location in sys.path, compile
and exec code in a different thread …) but never managed to get a “KO” from pure python.
Could it be related to the stderr/out redirection?
I also know that Anaconda is providing an optimized version of numpy relying on Intel Math Kernel Library. I guess this is the reason why there is difference between anaconda and standard python
+ pip approach, but I really don’t know why!
I get the same error when trying to execute help(„modules“) in a classic python shell. So at least on my setup this error does not seem to be related to EASE or Py4J.
I am using:
anaconda 4.2.0 (64 bit)
python 3.5.2
Numpy 1.11.1
Christian
Hello Christian,
Thanks for your reply.
Previously we had the 2.7 version running on windows 10, jdk 9.0, but we updated to python 3.6.5, ran the ```help(“modules”)``` command and it returned with the expected list of modules. We proceeded
to install *numpy* via _pip install_. Then we re-ran help(“modules”) and it hang as before. We uninstalled numpy, ran help(“modules”), and it gave us the list again. So it seems there’s something blocking with at least one package installed
along with numpy.
We also trying just importing numpy in our script and it got stuck. Our script only has these 3 lines:
print("Importing
numpy...")
import numpy
as np
print("numpy
imported.")
We switched to the Anaconda python distribution and configured py4j to use it, ran the script and it can indeed import numpy, yet the help(“modules”) still hangs.
Do you have any idea of why the standard distribution (at least in windows) of python isn’t working with EASE and numpy?
Cheers,
Sébastien,
David.
Hi David,
tried both commands on my linux system without any problems using EASE-nightly.
On windows we encountered some problems depending on the installed python version with some other commands. My local python version is 3.5.5
Which version are you using?
Christian
On 19.06.2018 16:01, LOPEZ BETANCUR David wrote:
Hello EASE-devs,
We are trying to use numpy with py4j, but our script is hanging at the line ```import numpy as np```.
Furthermore, when we run ```help("modules")``` it also hangs. Tracking the source of the problem, we found it's getting stuck in the *py4j.ClientServerConnection.readBlockingResponse* call. We are not sure why is this
happening.
Has anybody ran ```help("modules")``` within EASE ?
Cheers,
Sébastien.
David.
_______________________________________________
ease-dev mailing list
ease-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ease-dev