Author Topic: problem with scipy package  (Read 271 times)

starmm11

  • Newbie
  • *
  • Posts: 16
problem with scipy package
« on: March 30, 2018, 05:24:41 PM »
Hi,

I successfully installed scipy package by "ovitos -m pip install scipy". However when I'm trying to use it, for example
by including "from scipy.interpolate import CubicSpline" it produces an error "numpy.core.multiarray failed to import".
If I try to upgrade numpy at this point by "ovitos -m pip install --upgrade numpy" I get the following error
"PermissionError: [Errno 13] Permission denied: '....numpy\\core\\multiarray.pyd'

How to resolve this problem?

Alexander Stukowski

  • Administrator
  • Sr. Member
  • *****
  • Posts: 465
Re: problem with scipy package
« Reply #1 on: April 01, 2018, 12:35:56 PM »
Hi,

Please specify what OVITO version you are using and on which platform.
I just did a quick check with OVITO 3.0.0-dev under macOS and had no problem installing/loading Scipy.

-Alex

starmm11

  • Newbie
  • *
  • Posts: 16
Re: problem with scipy package
« Reply #2 on: April 01, 2018, 09:09:07 PM »
I tried Ovito 2.9 and 3.0 on Windows and had this problem.

Alexander Stukowski

  • Administrator
  • Sr. Member
  • *****
  • Posts: 465
Re: problem with scipy package
« Reply #3 on: April 03, 2018, 08:40:07 AM »
I was able to reproduce the problem: The scipy package installed via pip on Windows seems to require a version of the numpy that is newer than the one shipping with Ovito. Updating numpy via "pip install --upgrade" fails, unfortunately, because ovitos automatically loads numpy at startup, making it impossible for pip to overwrite the .pyd extension file (basically a DLL, which becomes write-protected once it is loaded into memory).

So far, I couldn't figure out a workaround for this problem. In this situation, the only way out will be to ship a newer version of numpy with Ovito. I am working a new build of Ovito 3.0.0-dev and let you know when it is available.

starmm11

  • Newbie
  • *
  • Posts: 16
Re: problem with scipy package
« Reply #4 on: April 04, 2018, 01:32:55 PM »
Many thanks! I hope scipy package will be available in ovito 3.0!

Alexander Stukowski

  • Administrator
  • Sr. Member
  • *****
  • Posts: 465
Re: problem with scipy package
« Reply #5 on: April 05, 2018, 02:02:15 PM »
I have built a new version of Ovito for Windows (3.0.0-dev180), which allows to install the scipy package using pip. You can find it on the Ovito download page.