[SOLVED] pyrate Installed but Does Not Show up as WB Option
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
[SOLVED] pyrate Installed but Does Not Show up as WB Option
I have installed the optical design WB pyrate with the add-on manager. The add-on manager shows pyrate as installed and even updates it, but no pyrate WB option shows up in the WB drop-menu. Earlier, there was a discussion thread about the aesthetics of the pyrate logo, but I think my issue is different, so I decided to start a new thread. I am running FC 0.18, fully updated, on Ubuntu 16.04, as per the info below. I remember that earlier this year I had a similar issue with the WorkFeature WB not showing up as an option on both FC 0.18 and FC 0.17 while the add-on manager showed as installed, but that issue resolved itself.
OS: Ubuntu 16.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15363 (Git)
Build type: Release
Branch: master
Hash: 9be3e633328335f1172456f5857219b7a08c70a5
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
OS: Ubuntu 16.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15363 (Git)
Build type: Release
Branch: master
Hash: 9be3e633328335f1172456f5857219b7a08c70a5
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
Last edited by cflin on Sat Jan 19, 2019 6:56 am, edited 1 time in total.
Re: pyrate Installed but Does Not Show up as WB Option
Hi @cflin
Likely this isn't a question directly related to UX/UI Design. Anyway, if the workbench isn't listed an error during FreeCAD (mentioned module) start might occur. Make sure that under Edit -> Preferences -> General -> Output window -> Output all options are checked. Restart FreeCAD and look in the Report view, if any clues (errors) will emerge.
Likely this isn't a question directly related to UX/UI Design. Anyway, if the workbench isn't listed an error during FreeCAD (mentioned module) start might occur. Make sure that under Edit -> Preferences -> General -> Output window -> Output all options are checked. Restart FreeCAD and look in the Report view, if any clues (errors) will emerge.
Re: pyrate Installed but Does Not Show up as WB Option
you need to install python-scipy from your package manager
"fight the good fight"
Re: pyrate Installed but Does Not Show up as WB Option
@triplus: Thank you for your insightful recommendation to turn on all output options. A lot of messages come out because quite a few modules are loaded, but one of them stuck out like a sore thumb:
Upon closer look, it seems that the missing 'InitGui.py' affects other modules as well, which, like 'pyrate' do not show up as WB options but the add-on manager is well-aware they are installed and updates them. I get similar warnings. So, it is probably not an issue with 'pyrate' but a more systematic one.
In my version of FreeCAD, to set the output options I have to select Edit→Preferences→Ouput window, which is slightly different than what you described. (I found my way, though. Thank's again.) As for this posting not being entirely appropriate for this category, could you recommend another topic area? I surely don't want to post stuff where it does not belong.
Code: Select all
Init: Initializing /home/cflin/.FreeCAD/Mod/pyrate(InitGui.py not found)... ignore
In my version of FreeCAD, to set the output options I have to select Edit→Preferences→Ouput window, which is slightly different than what you described. (I found my way, though. Thank's again.) As for this posting not being entirely appropriate for this category, could you recommend another topic area? I surely don't want to post stuff where it does not belong.
Re: pyrate Installed but Does Not Show up as WB Option
You're welcome.
I did a quick test. This module uses a new import style and therefore that shouldn't prevent it from running. Likely, as @sgrogan indicated, there is an additional line saying some dependency is missing. Installing the module with addon managed and using FreeCAD 0.18 from PPA, having this dependencies installed on the system:Upon closer look, it seems that the missing 'InitGui.py' affects other modules as well, which, like 'pyrate' do not show up as WB options but the add-on manager is well-aware they are installed and updates them.Code: Select all
Init: Initializing /home/cflin/.FreeCAD/Mod/pyrate(InitGui.py not found)... ignore
Code: Select all
sudo apt-get install python python-numpy python-scipy python-matplotlib python-yaml python-sympy
It works on my side after.
I see that one of the mods has already moved the thread to appropriate category.As for this posting not being entirely appropriate for this category, could you recommend another topic area? I surely don't want to post stuff where it does not belong.
Re: pyrate Installed but Does Not Show up as WB Option
@triplus
Thank you for your time.
I also uninstalled with '--purge' freecad-daily and reinstalled it. From the ppa all the time. I also uninstalled and reinstalled pyrate, but I still don't see pyrate with the same message about 'InitGui.py' not found (and similarly other installed WBs do not show up and the warning is the same). So, it seems to me the issue is this 'InitGui.py', which seems to affect other WBs as well. Where on your installation is this elusive 'InitGui.py' installed? I don't see any other messages about dependencies, except that about the missing 'InitGui.py'.
I am not sure where this tread has been transferred by the moderator(s). I checked pyrate on github, as per the URL shown, but I did not see anything like this thread there.
Thank you for your time.
Done. All these packages are now installed. (I use Anaconda for my Python needs, so Ubuntu 16.04's Python did not have some of this stuff installed.)Code: Select all
sudo apt-get install python python-numpy python-scipy python-matplotlib python-yaml python-sympy
I also uninstalled with '--purge' freecad-daily and reinstalled it. From the ppa all the time. I also uninstalled and reinstalled pyrate, but I still don't see pyrate with the same message about 'InitGui.py' not found (and similarly other installed WBs do not show up and the warning is the same). So, it seems to me the issue is this 'InitGui.py', which seems to affect other WBs as well. Where on your installation is this elusive 'InitGui.py' installed? I don't see any other messages about dependencies, except that about the missing 'InitGui.py'.
I am not sure where this tread has been transferred by the moderator(s). I checked pyrate on github, as per the URL shown, but I did not see anything like this thread there.
Re: pyrate Installed but Does Not Show up as WB Option
I get that message too, but is still works. This module is using the new import style and the produced message is therefore normal. Inside .FreeCAD/Mod folder, there should be a pyrate folder, containing some files and folders. I guess best if you temporarily move all other modules to a different location. And start FreeCAD again. If no errors will be reported, and it still won't be listed, try running this code from the FreeCAD Python console:cflin wrote: ↑Wed Dec 12, 2018 4:41 pm I also uninstalled and reinstalled pyrate, but I still don't see pyrate with the same message about 'InitGui.py' not found (and similarly other installed WBs do not show up and the warning is the same). So, it seems to me the issue is this 'InitGui.py', which seems to affect other WBs as well. Where on your installation is this elusive 'InitGui.py' installed? I don't see any other messages about dependencies, except that about the missing 'InitGui.py'.
Code: Select all
Gui.activateWorkbench("PyrateWorkbench")
Re: pyrate Installed but Does Not Show up as WB Option
I wondered how this can work as this wasn't by design. But it seems the new-style fully works with the addon-manager and this is why:
1. The old way to load modules adds every directory in .FreeCAD/Mod to the sys.path
2. Now that the base-directory is added to sys.path everything in the .FreeCAD/Mod/<module>/freecad is accessible as a namespace-package and is initialized by the new way to load workbenches/modules.
So the addon-manager should fully work for new-style modules. Feature or bug?
Re: pyrate Installed but Does Not Show up as WB Option
@triplus: Thank you for your suggestion to keep only pyrate in '~/.FreeCAD/Mod'. Without any other module present in that directory, 'pyrate' showed up fine as a WB selection. That got me thinking. Adding (copying) the previously installed modules back to '~/.FreeCAD/Mod' one by one and checking whether the pyrate WB shows up as a selection, I determined that the problem occurs when module 'FCGear' is installed. So, it seems to me that the installation of FCGear, which does show up as a WB selection, prevents pyrate from showing up as a WB selection for some reason I don't understand.
Re: pyrate Installed but Does Not Show up as WB Option
I see this problem. I guess this is related to using namespace-packages with the add-on manager.cflin wrote: ↑Sun Dec 16, 2018 7:59 pm @triplus: Thank you for your suggestion to keep only pyrate in '~/.FreeCAD/Mod'. Without any other module present in that directory, 'pyrate' showed up fine as a WB selection. That got me thinking. Adding (copying) the previously installed modules back to '~/.FreeCAD/Mod' one by one and checking whether the pyrate WB shows up as a selection, I determined that the problem occurs when module 'FCGear' is installed. So, it seems to me that the installation of FCGear, which does show up as a WB selection, prevents pyrate from showing up as a WB selection for some reason I don't understand.
I guess I was a bit too fast with assuming that it always works. The problem seems to be that only one name-space-package installed with the add-on-manager works. Somehow the others are hidden. I guess this is to due the way how namespace-packages are initialized.
Ok, I found the problem. Please add this to all freecad/__init__.py files in ~/.FreeCAD/Mod:
Code: Select all
__path__ = __import__('pkgutil').extend_path(__path__, __name__)