I examined that, but it also gives me that error. I guess it's related to lic6, isn't that? it works on old manjaro. I also wanted to update hole of my system, but it told me that's every thing is up to date
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: 625
- Joined: Sun Sep 09, 2018 7:00 pm
- Location: Iran
- Contact:
Re: Porting to python3
Re: Porting to python3
Today i don't have more time, but for the future reference, can you describe the procedure more in detail? Procedure leading to crash. I am guessing crash happens when using some command from your module/workbench?
P.S. Ideally you would narrow it down to a code snippet.
P.S. Ideally you would narrow it down to a code snippet.
- ebrahim raeyat
- Posts: 625
- Joined: Sun Sep 09, 2018 7:00 pm
- Location: Iran
- Contact:
Re: Porting to python3
yes. in interactive python consol in FreeCAD type this:triplus wrote: ↑Tue Dec 11, 2018 8:37 pm Today i don't have more time, but for the future reference, can you describe the procedure more in detail? Procedure leading to crash. I am guessing crash happens when using some command from your module/workbench?
P.S. Ideally you would narrow it down to a code snippet.
Code: Select all
import pandas as pd
df = pd.DataFrame()
df.to_excel('/home/ebi/df1.xlsx')
Re: Porting to python3
if you have installed pandas with pip-tools it is installed in a local directory. So maybe this package hides the conda-package which is installed in another location. You can check this with:ebrahim raeyat wrote: ↑Tue Dec 11, 2018 8:26 pm I examined that, but it also gives me that error. I guess it's related to lic6, isn't that? it works on old manjaro. I also wanted to update hole of my system, but it told me that's every thing is up to date
Code: Select all
import pandas as pd
pd.__file__
- ebrahim raeyat
- Posts: 625
- Joined: Sun Sep 09, 2018 7:00 pm
- Location: Iran
- Contact:
Re: Porting to python3
in both miniconda and AppImage pandas's path is:looo wrote: ↑Tue Dec 11, 2018 9:52 pmFor me your code-snippet worked after installing pandas and xlwt from conda. So I still believe your problem is related to an incompatible pandas.Code: Select all
import pandas as pd pd.__file__
Code: Select all
'/home/ebi/.local/lib/python3.6/site-packages/pandas/__init__.py'
python 3.6 is for conda and AppImage. it is my site-package in AppImage:
Re: Porting to python3
Exactly this is the problem. This local Install of pandas hides the system/ conda package. Simple remove the pandas in .local/lib/python3.6 and test again.ebrahim raeyat wrote: ↑Wed Dec 12, 2018 6:33 am in both miniconda and AppImage pandas's path is:
'/home/ebi/.local/lib/python3.6/site-packages
- ebrahim raeyat
- Posts: 625
- Joined: Sun Sep 09, 2018 7:00 pm
- Location: Iran
- Contact:
Re: Porting to python3
when I moved site-packages in loacal and run miniconda FreeCAD, pandas's path is:
'/home/ebi/miniconda3/envs/fc_test/lib/python3.6/site-packages/pandas/__init__.py'
but same problem still exist. in AppImage it not recognize pandas at all. how can i install pandas? I extract AppImage and go to the bin folder and run:
Code: Select all
./python
is it true if i install package in below manner:
./python -m pip install PACKAGENAME
thanks
Re: Porting to python3
Yes, to get you started, a solution and explanation from @looo makes sense. That is to remove the pip pandas version altogether and use (install) FreeCAD and pandas from Conda channels.
As for the bigger problem involved. I guess this shows on just how problematic FreeCAD module dependencies can be. We can not always rely on pip. Libraries available by default (AppImage, macOS and Windows binaries) is what FreeCAD module developer can more or less rely on. Everything else can represent a problem. And likely we will never pack all the dependencies FreeCAD module developers might use in the binaries. Therefore different possible solutions for specific use case problems will i guess need to be explored. As for the AppImage. On how to make it work. I can do some tests but likely not before next week. And there is another problem. If the solution won't be straightforward. Potential end users will have issues when trying to use your module. And therefore packing pandas in AppImage is one solution. But what about other platforms?
As for the bigger problem involved. I guess this shows on just how problematic FreeCAD module dependencies can be. We can not always rely on pip. Libraries available by default (AppImage, macOS and Windows binaries) is what FreeCAD module developer can more or less rely on. Everything else can represent a problem. And likely we will never pack all the dependencies FreeCAD module developers might use in the binaries. Therefore different possible solutions for specific use case problems will i guess need to be explored. As for the AppImage. On how to make it work. I can do some tests but likely not before next week. And there is another problem. If the solution won't be straightforward. Potential end users will have issues when trying to use your module. And therefore packing pandas in AppImage is one solution. But what about other platforms?
- ebrahim raeyat
- Posts: 625
- Joined: Sun Sep 09, 2018 7:00 pm
- Location: Iran
- Contact:
Re: Porting to python3
in AppImage i install dependency for pandas and the path is:
'/home/ebi/Applications/squashfs-root/usr/lib/python3.6/site-packages/pandas/__init__.py'
but still error occured. I will examin the path in old manjaro and my new ubuntu.
'/home/ebi/Applications/squashfs-root/usr/lib/python3.6/site-packages/pandas/__init__.py'
but still error occured. I will examin the path in old manjaro and my new ubuntu.
Re: Porting to python3
Yes exactly. AppImage and pandas installed with pip (in your use case and environment won't work). We can try to find a solution in the future.
For now therefore removing the pandas installed with pip altogether and after installing and using FreeCAD and pandas from Conda, should work.
For now therefore removing the pandas installed with pip altogether and after installing and using FreeCAD and pandas from Conda, should work.