Porting to python3
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
- ebrahim raeyat
- Posts: 619
- Joined: Sun Sep 09, 2018 7:00 pm
- Location: Iran
- Contact:
Re: Porting to python3
as i mentioned i remove the local library and in miniconda i installed dependency with conda, but it crashed.
in my old manjaro with conda installation it work perfectly:
but AppImage still crashes. I will examin it in my new ubuntu!
in my old manjaro with conda installation it work perfectly:
but AppImage still crashes. I will examin it in my new ubuntu!
Re: Porting to python3
I see. Therefore you still get a crash when using only FreeCAD and pandas from Conda, and after you removed pandas installed from pip. Well this i guess does indicate some additional issue is involved. Maybe related to system. We can explore this further, but i don't know how much time i will have before next week. Maybe @looo could share the exact procedure he uses for installing FreeCAD and pandas from Conda. Likely not, but maybe there is a difference there.
P.S. Note that i installed your civil module yesterday, and today i noticed it will crash FreeCAD installed from PPA on FreeCAD start (Ubuntu 16.04). But this is likely entirely different issue. Not related to pandas.
P.S. Note that i installed your civil module yesterday, and today i noticed it will crash FreeCAD installed from PPA on FreeCAD start (Ubuntu 16.04). But this is likely entirely different issue. Not related to pandas.
- ebrahim raeyat
- Posts: 619
- Joined: Sun Sep 09, 2018 7:00 pm
- Location: Iran
- Contact:
Re: Porting to python3
I test it on ubuntu and it works perfectly. my system:
OS: Ubuntu 18.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.5235 (Git shallow)
Build type: Release
Branch: master
Hash: 0811f1d7844b82dff77c6b4b0ae92ea419b836da
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
pandas's path file:
'/home/ebi/miniconda2/envs/freecad_py3/lib/python3.6/site-packages/pandas/__init__.py'
- ebrahim raeyat
- Posts: 619
- Joined: Sun Sep 09, 2018 7:00 pm
- Location: Iran
- Contact:
Re: Porting to python3
I found that error related to openpyxl module when using with PyQt. in FreeCAD this command produce same problem and crash the FreeCAD:
but in python that comes with Freecad conda in interactive mode (without FreeCAD running) it works perfectly:
i found this stackoverflow post that says it's related to libz:
https://stackoverflow.com/questions/263 ... -and-pyqt4
It seems it's not related to FreeCAD!! i must resolve that. thanks you so much.
Code: Select all
import openpyxl
Code: Select all
[ebi@ebrahim-pc bin]$ ./python
Python 3.6.7 | packaged by conda-forge | (default, Nov 21 2018, 02:32:25)
[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import openpyxl
>>> import pandas
>>> openpyxl.__file__
'/home/ebi/Applications/squashfs-root/usr/lib/python3.6/site-packages/openpyxl/__init__.py'
>>> pandas.__file__
'/home/ebi/Applications/squashfs-root/usr/lib/python3.6/site-packages/pandas/__init__.py'
>>> df = pandas.DataFrame()
>>> df.to_excel('/home/ebi/3.xlsx')
>>>
https://stackoverflow.com/questions/263 ... -and-pyqt4
It seems it's not related to FreeCAD!! i must resolve that. thanks you so much.
- ebrahim raeyat
- Posts: 619
- Joined: Sun Sep 09, 2018 7:00 pm
- Location: Iran
- Contact:
Re: Porting to python3
but in interactive python it works even with importing QtGui:ebrahim raeyat wrote: ↑Wed Dec 12, 2018 7:26 pm It seems it's not related to FreeCAD!! i must resolve that. thanks you so much.
Code: Select all
[ebi@ebrahim-pc bin]$ ./python
Python 3.6.7 | packaged by conda-forge | (default, Nov 21 2018, 02:32:25)
[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from PySide2 import QtGui
>>> import openpyxl
>>> import pandas
>>> QtGui.__file__
'/home/ebi/Applications/squashfs-root/usr/lib/python3.6/site-packages/PySide2/QtGui.cpython-36m-x86_64-linux-gnu.so'
>>> df = pandas.DataFrame()
>>> df.to_excel('/home/ebi/6.xlsx')
>>>
Re: Porting to python3
maybe expat is the reason. I guess the manjaro-problem is hard to solve, and not worth trying to as too much hours will be lost. I guess this is a general problem of linux. It's hard to find a way packages run on every distro. Conda does it's best, but some distros will have problem.
I guess there are 2 things which makes conda-builds work more reliable on any system:
- going to gcc7-based builds. There we are able to define linked system-packages by a defined layer which is called cdt (Core Dependency Tree). These packages are repackaged centos-6 libraries. Also the build-environment seems to be more solid as it doesn't sit on top of the system. At least I get the impression of this, as building packages is a bit more difficult now... But I guess the result will be more reliable packages.
- not using too "uptodate" distros. I guess this is a general problem new-comers are often not aware of. (It was the same for me. When you begin to dive into the linux world you want to have all the latest stuff. But once you have dived in enough all you want is stability. eg.: python3, qt5)
I guess there are 2 things which makes conda-builds work more reliable on any system:
- going to gcc7-based builds. There we are able to define linked system-packages by a defined layer which is called cdt (Core Dependency Tree). These packages are repackaged centos-6 libraries. Also the build-environment seems to be more solid as it doesn't sit on top of the system. At least I get the impression of this, as building packages is a bit more difficult now... But I guess the result will be more reliable packages.
- not using too "uptodate" distros. I guess this is a general problem new-comers are often not aware of. (It was the same for me. When you begin to dive into the linux world you want to have all the latest stuff. But once you have dived in enough all you want is stability. eg.: python3, qt5)
Re: Porting to python3
I likely won't have time to come back to this before Sunday/Monday. After i can read the discussion again and do some tests.
Re: Porting to python3
Just encountered a problem on Windows 7 I never had on Windows 10 and on Linux. I do not know it this has reported before ...
- Start FreeCAD, everything looks good Screen1
- make a new Document, FreeCAD gui (icons and menue bar) look strange and is not usable Screen2
- close the docment, wait some seconds, FreeCAD goes back to looking good Screen1
OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15468 (Git)
Build type: Release
Branch: master
Hash: 4c67a5c3c66e0796be9884df65655ea679f31919
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Switzerland (de_CH)
- Start FreeCAD, everything looks good Screen1
- make a new Document, FreeCAD gui (icons and menue bar) look strange and is not usable Screen2
- close the docment, wait some seconds, FreeCAD goes back to looking good Screen1
OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15468 (Git)
Build type: Release
Branch: master
Hash: 4c67a5c3c66e0796be9884df65655ea679f31919
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Switzerland (de_CH)
Re: Porting to python3
Using :
OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15468 (Git)
Build type: Release
Branch: master
Hash: 4c67a5c3c66e0796be9884df65655ea679f31919
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)
I've tried a variety of Start Preference changes to try to replicate your report and I've failed miserably to do so. I've used FreeCAD with Windows 7 64 bit for 18 months (regularly keeping FreeCAD up-to-date) and never had the icons/toolbars behaving like that. I use a ASUS i7 motherboard with 24Gb ram and a NVIDIA GeForce GTX 670 graphics card (driver version 396.38) if that's of any use.
OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15468 (Git)
Build type: Release
Branch: master
Hash: 4c67a5c3c66e0796be9884df65655ea679f31919
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)
I've tried a variety of Start Preference changes to try to replicate your report and I've failed miserably to do so. I've used FreeCAD with Windows 7 64 bit for 18 months (regularly keeping FreeCAD up-to-date) and never had the icons/toolbars behaving like that. I use a ASUS i7 motherboard with 24Gb ram and a NVIDIA GeForce GTX 670 graphics card (driver version 396.38) if that's of any use.
Re: Porting to python3
Perhaps it's time again to reset the preferences.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.