Closed albop closed 6 years ago
This was fixed in commit https://github.com/EconForge/interpolation.py/commit/6b683b70eb78e254a4a997be7fde53137971ca40 by avoiding the creation of an egg directory.
I am having a similar problem without using conda:
`RuntimeError Traceback (most recent call last)
OH no ! @fheday, could you print the output of conda info
and conda list | grep numba
?
Sure, (but I am running it without conda) here it is:
`$ /opt/anaconda/bin/conda info
active environment : None
user config file : /home/heday/.condarc
populated config files : /home/heday/.condarc
conda version : 4.5.4
conda-build version : 3.10.5
python version : 3.6.5.final.0
base environment : /opt/anaconda (read only)
channel URLs : https://conda.anaconda.org/conda-forge/linux-64
https://conda.anaconda.org/conda-forge/noarch
https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/linux-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/pro/linux-64
https://repo.anaconda.com/pkgs/pro/noarch
package cache : /opt/anaconda/pkgs
/home/heday/.conda/pkgs
envs directories : /home/heday/.conda/envs
/opt/anaconda/envs
platform : linux-64
user-agent : conda/4.5.4 requests/2.18.4 CPython/3.6.5 Linux/4.17.2-1-ARCH arch/rolling glibc/2.27
UID:GID : 1000:1000
netrc file : None
offline mode : False
$ /opt/anaconda/bin/conda list |grep numba
numba 0.38.0 py36h637b7d7_0`
My system's numba is: python-numba 0.38.0-1
My python version: python 3.6.5-3
Having the same issue. How can I resolve it?
conda info
below: My numba version is 0.35.0
active environment : base active env location : C:\ProgramData\Anaconda3 shell level : 1 user config file : C:\Users\royan18.condarc populated config files : conda version : 4.5.5 conda-build version : 3.0.27 python version : 3.6.3.final.0 base environment : C:\ProgramData\Anaconda3 (writable) channel URLs : https://repo.anaconda.com/pkgs/main/win-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/free/win-64 https://repo.anaconda.com/pkgs/free/noarch https://repo.anaconda.com/pkgs/r/win-64 https://repo.anaconda.com/pkgs/r/noarch https://repo.anaconda.com/pkgs/pro/win-64 https://repo.anaconda.com/pkgs/pro/noarch https://repo.anaconda.com/pkgs/msys2/win-64 https://repo.anaconda.com/pkgs/msys2/noarch package cache : C:\ProgramData\Anaconda3\pkgs C:\Users\royan18\AppData\Local\conda\conda\pkgs envs directories : C:\ProgramData\Anaconda3\envs C:\Users\royan18\AppData\Local\conda\conda\envs C:\Users\royan18.conda\envs platform : win-64 user-agent : conda/4.5.5 requests/2.18.4 CPython/3.6.3 Windows/10 Windows/10.0.17134 administrator : True netrc file : None offline mode : False
@royan18, @fheday : sorry I let that one slip. I have reopened the issue.
I gather you are both using windows and installed from the github directory with pip install .
(since
latest version on pypi is 0.1.6). Can you give me the precise command which triggers the error message ? That is not clear from the discussion above.
@albop The error happened when I was trying to run f_intp = CubicSpline(a, b, orders, data)
. I think @fheday had a similar situation.
Si I assume data has the right dimension ? (I.e. data.ndim==a.shape[0]) Trouble is I can't replicate the problem on my laptop. How did you install the package ? (Pip, python setup.py, conda...)
Le ven. 13 juil. 2018 à 22:24, royan18 notifications@github.com a écrit :
@albop https://github.com/albop The error happened when I was trying to run f_intp = CubicSpline(a, b, orders, data). I think @fheday https://github.com/fheday had a similar situation.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/EconForge/interpolation.py/issues/14#issuecomment-404944001, or mute the thread https://github.com/notifications/unsubscribe-auth/AAQ5KXmRIkVf92PJ4e7RaGAqxxjLXfvGks5uGQH-gaJpZM4Iq6U9 .
I installed the package using the command python setup.py install
Let me give you a more clear context. I followed the instructions in the Notebook, but I didn't fail until section In [9] when running interp = CubicSpline(a,b,orders,vals)
.
Is it a better example?
Thanks. Would you mind reinstalling and reinstalling with pip install and check whether it solves the problem ?
Le ven. 13 juil. 2018 à 23:52, royan18 notifications@github.com a écrit :
I installed the package using the command python setup.py install Let me give you a more clear context. I followed the instructions in the Notebook https://github.com/EconForge/interpolation.py/blob/master/examples/cubic_splines_python.ipynb, but I didn't fail until section In [9] when running interp = CubicSpline(a,b,orders,vals). Is it a better example?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/EconForge/interpolation.py/issues/14#issuecomment-404963328, or mute the thread https://github.com/notifications/unsubscribe-auth/AAQ5Kd9emwcI6NmFIx8bEKkb-CiUtd_Aks5uGRaQgaJpZM4Iq6U9 .
I mean "pip install ." from within the cloned directorynot pulling from pypi
Le ven. 13 juil. 2018 à 23:53, Pablo Winant pablo.winant@gmail.com a écrit :
Thanks. Would you mind reinstalling and reinstalling with pip install and check whether it solves the problem ?
Le ven. 13 juil. 2018 à 23:52, royan18 notifications@github.com a écrit :
I installed the package using the command python setup.py install Let me give you a more clear context. I followed the instructions in the Notebook https://github.com/EconForge/interpolation.py/blob/master/examples/cubic_splines_python.ipynb, but I didn't fail until section In [9] when running interp = CubicSpline(a,b,orders,vals). Is it a better example?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/EconForge/interpolation.py/issues/14#issuecomment-404963328, or mute the thread https://github.com/notifications/unsubscribe-auth/AAQ5Kd9emwcI6NmFIx8bEKkb-CiUtd_Aks5uGRaQgaJpZM4Iq6U9 .
Okay, but I got an error when installing:
C:\interpolation.py-master>pip install setup.py Collecting setup.py Could not find a version that satisfies the requirement setup.py (from versions: ) No matching distribution found for setup.py
Please advice whether I use the correct path and command.
Move to the same directory where setup my is. Then type "pip install ."
Le sam. 14 juil. 2018 à 00:30, royan18 notifications@github.com a écrit :
Okay, but I got an error when installing:
C:\interpolation.py-master>pip install setup.py Collecting setup.py Could not find a version that satisfies the requirement setup.py (from versions: ) No matching distribution found for setup.py
Please advice whether I use the correct path and command.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/EconForge/interpolation.py/issues/14#issuecomment-404969715, or mute the thread https://github.com/notifications/unsubscribe-auth/AAQ5KTgm2nE6lyxIDz0txvlpkx7BLgdsks5uGR9qgaJpZM4Iq6U9 .
Sorry I missed your previous message. Tried pip install .
and now it works! Thanks so much @albop
For the record, I got a plausible explanation of what was happening there. By default setup.py creates a zip archive of the library which is then copied in the python installation directory. Then the intepreter mounts this archive and reads files from it transparently. But it cannot write into it, which is a problem for numba because that is where the cached jitted functions are written.
There seems to be a fix for that: add the option zip_safe=False
to the setup.py
file. @royan18 : would you horribly mind trying whether python setup.py install
would work with this modification ?
Adding zip_safe=False
to setup.py resolves the issue!
Thanks @MaximilianHoffmann . I've merged the amended setup.py in master.
Trying to bulid conda packages yields some error linked to the
njit(cache=true)
option:Not sure where it comes from and I haven't been able to produce a smaller self contained example.