taschini/pyinterval

crlibm extension...

Opened this issue · 8 comments

Of course it's not the right place to solve this, but it would be kind of you to help to solve this:
Cannot load crlibm extension. The imath functions will not be available.

Problem with pyinterval / Python3.4 / WS7-32 : What should I do ?
Thank you in advance

This means that crlibm did not install properly.

There are two possible ways forward:

  1. If you don't need any of the transcendental functions (cos, sin, exp, log etc.) that live in the imath module you can simply go on and ignore the message.

  2. If you do need the functions in the imath module you can try and install by hand crlibm. Since there are binary wheels for Python3.4 on Windows both for 32 and 64 bit Pythons, it should work:

python.exe -m pip install crlibm

Can you try and tell me whether the following works?

>>> from interval import interval
>>> x = interval[1, 2]; x
interval([1.0, 2.0])
>>> x[0].sup
2.0
>>> x[0].inf
1.0

So I believe I can close this, right?

18 months later and still addicted to pyinterval & crlibm !
I up graded Python to 3.7 and need to recreate my environnement, but it seems there is no binary wheel for Python > 3.5 for crlibm and pyinterval

What should I do ? I tried to follow the instructions @ http://stackoverflow.com/a/30071634.
but it's incomplet and too far from my limited expertise !
What should I learn ? What should I do ?

Many thanks for your attention,
Stéphane

i want to use pyinterval too and i get the following error through when pip install pyinterval

Failed to build crlibm

i have the lastest anaconda installed. (python-3.7 :/)

On CentOS 7, the supporting libraries for crlibm are no longer shipped in EPEL (libscs and libcrlibm). I build them manually even though I don't use imath.

Would you consider splitting pyinterval into pyinterval and pyinterval_imath?

Or...isn't there a way to modify setup.py to have special installs? I can't recall the name of it -- Ah! extras?

https://stackoverflow.com/questions/10572603/specifying-optional-dependencies-in-pypi-python-setup-py

And then the users if they want imath do

pip install pyinterval[imath]

https://stackoverflow.com/questions/36490897/how-to-install-python-module-extras-with-pip-requirements-txt-file

i.e.,

$ git diff
diff --git a/setup.py b/setup.py
index 68709b9..6d3d64f 100755
--- a/setup.py
+++ b/setup.py
@@ -20,7 +20,7 @@ metadata = dict(
     author           = 'Stefano Taschini',
     author_email     = 'taschini@gmail.com',
     description      = 'Interval arithmetic in Python',
-    install_requires = ['crlibm>=1.0.3,==1.*', 'six>=1.10'],
+    install_requires = ['six>=1.10'],
     keywords         = 'interval crlibm',
     license          = 'BSD',
     long_description = read_long_description(),
@@ -40,6 +40,9 @@ metadata = dict(
             'pytest-cov',
             'tox',
             'zest.releaser[recommended]',
+        ],
+        'imath': [
+            'crlibm>=1.0.3,==1.*',
         ]
     },