These are chat archives for symengine/symengine

12th
Dec 2015
Ralf Stephan
@rwst
Dec 12 2015 07:37 UTC

How to switch symengine.py to Py3? I set all my PY shell vars:

ralf@ark:~/symengine.py> set|grep PY
PYTHONSTARTUP=/etc/pythonstart
PYTHON_BIN=/usr/bin/python3
PYTHON_INCLUDE_PATH=/usr/include/python3.4m
PYTHON_INSTALL_PATH=/usr/lib64/python3.4/site-packages
PYTHON_LIBRARY=/usr/lib64/libpython3.4.so

but

ralf@ark:~/symengine.py> rm CMakeCache.txt
ralf@ark:~/symengine.py> cmake .
...
-- Python include path: /usr/include/python2.7
-- Python version: 2.7
-- Python install path: /usr/lib/python2.7/site-packages
-- Found PYTHON: /usr/lib64/libpython2.7.so
Isuru Fernando
@isuruf
Dec 12 2015 07:38 UTC
cmake -DPYTHON_BIN=python3 .
or
python3 setup.py install
Ralf Stephan
@rwst
Dec 12 2015 07:41 UTC
Not working:
ralf@ark:~/symengine.py> cmake -DPYTHON_BIN=python3 .
...
-- Python include path: PYTHON_INCLUDE_PATH-NOTFOUND
-- Python version: 3.4
-- Python install path: /usr/lib/python3.4/site-packages
-- Could NOT find PYTHON (missing:  PYTHON_LIBRARY PYTHON_INCLUDE_PATH)
Can't cmake take all PY env vars from the enviroment?
Isuru Fernando
@isuruf
Dec 12 2015 07:44 UTC
Yes, we should add those to our cmake script. What's sys.prefix for your python3 installation?
Ralf Stephan
@rwst
Dec 12 2015 07:44 UTC
How would I query that?
Isuru Fernando
@isuruf
Dec 12 2015 07:45 UTC
In a python3 shell, do
import sys
print(sys.prefix)
Ralf Stephan
@rwst
Dec 12 2015 07:47 UTC
it's /usr
Isuru Fernando
@isuruf
Dec 12 2015 07:48 UTC
What about the following variables
from distutils.sysconfig import get_python_inc
print(get_python_inc())
from distutils.sysconfig import get_config_var
print(get_config_var('LIBDIR'))
Ralf Stephan
@rwst
Dec 12 2015 07:49 UTC
sorry afk
Isuru Fernando
@isuruf
Dec 12 2015 07:57 UTC
No problem. let me know what those are when you have the time. Also,
from distutils.sysconfig import get_python_lib
print(get_python_lib())
Ralf Stephan
@rwst
Dec 12 2015 08:02 UTC
@isuruf
In [4]: print(get_python_inc())
/usr/include/python3.4m
In [6]: print(get_config_var('LIBDIR'))
/usr/lib64
In [8]: print(get_python_lib())
/usr/lib/python3.4/site-packages
Yes oddly the include is 3.4m
Akash Trehan
@CodeMaxx
Dec 12 2015 08:04 UTC
Hi guys! I've joined this community recently and want to contribute. I recently did #138 . Please suggest some issues I can fix.
Ralf Stephan
@rwst
Dec 12 2015 08:06 UTC
@isuruf Is symengine-Py3 supposed to work? I get with make
[ 40%] Building CXX object symengine/lib/CMakeFiles/symengine_wrapper.dir/pywrapper.cpp.o
/home/ralf/symengine.py/symengine/lib/symengine_wrapper.cpp:16:20: fatal error: Python.h: No such file or directory
compilation terminated.
OK I'm abandoning the attempt. That means no nosetests for my expansion tests.
@CodeMaxx The whole of mathematics is missing in SymEngine and you're asking what to do ;-)
Isuru Fernando
@isuruf
Dec 12 2015 08:11 UTC
It is supposed to work.
Ralf Stephan
@rwst
Dec 12 2015 08:16 UTC
@isuruf Not really a problem. I now get good diagnostics from manually inserting commands into isympy.
Sumith Kulal
@Sumith1896
Dec 12 2015 08:48 UTC
This message was deleted
@CodeMaxx I'll review symengine/symengine#678 for you. Till then you can browse the issues and find something of your interest
Ralf Stephan
@rwst
Dec 12 2015 16:15 UTC
Is SymEngine supposed to not override SymPy code? I would like to override SymPy's series() because it's so unusable, but I never questioned this wish. Is there a design decision that we should make SymEngine always optional, e.g. because it's polite to do so?
Isuru Fernando
@isuruf
Dec 12 2015 17:13 UTC
One of the reasons why SymPy is popular is that it is pure Python and it can be installed in all systems where there is a Python installation.
But you are right, series is unusable in SymPy and rs_series will soon replace the existing one