anuga_core
anuga_core copied to clipboard
compile the anuga with python3.6
Hi everyone:
Also @stoiver . Can I compile the anuga with python3.6 under ubuntu18.04? I see the python version of python is 2.7 almostly. If I use python 3.6, is there any problem? I will try and hope to get your experiences.
Best reagards dongxueyang
We are in the process of porting anuga over to python 3. You will find a new branch anuga_py3 in which we are currently moving to python 3. At present we are converting the glue code to using cython.
@Dongxueyang We are currently porting over to python 3. The current work is in teh branch anuga_py3. But we have currently only worked on the connection between teh C code and python via cython.
Thank you so much @stoiver So now I can download the anuga_py3. and compile with python3,right? Is there any problems I will get when I run the new version anuga_py3.?
I have tried to converse python2 to python3 one file by one file. It is difficult and tired of so many files.
dong
@stoiver I have downloaded the code of anuga_core_py3. And I want to know what is the differences ? I check the tools/install_ubuntu.sh and can not find any differences. The contents related to python verison are still python2 not python3.
@Dongxueyang No you can't use python 3 yet.
In the branch anuga_py3 we are doing preparatory work before doing the porting to python 3. We are hoping to get the work finished in the next month.
@stoiver Ok thanks a lot.
@stoiver I try to use 2to3.py a script with python to convert anuga from python2 to python3. And I make some adjustments with file install_ubuntu.sh and build_all.py so that I can compile anuga only using python3. And now I got error like this:
I have install python3-dev ,but no use. So can you give me some advice? Best regards dong
@stoiver How about your work on porting from python2 to python3? I am trying to modify the code to porte to python3. But I got so many errors and one error was solved while some new errors come soon.
See also: 2to3, which can automate the process of converting code from Python 2 to Python 3.
Hi, I have tried using the 2to3 tool. Does it really convert from python 2 to python 3 ? As I'm still getting some errors.
Hi @samcom12 , at present we have the old version of anuga which runs under python 2.7 (the master branch) and an alternative version in branch anuga_py3 which runs under python 3.8 (and probably 3.6) and almost under python 2.7. So you should checkout the anuga_py3 branch and follow the implicit instructions in the installation scripts in the tools directory. I suggest using the conda installation to ensure you have the correct python version and libraries.
We now have the python 3 version available as the main (default) branch. The old python 2.7 version is available as the anuga_py2 branch. We are now only developing the python 3 version.