mgear_legacy
mgear_legacy copied to clipboard
installation impossible - Python errors
I add the module path to the maya.env file correctly, it is detected, but big Python errors appear while opening maya. I'm using mgear 2.1 and 2.2 due to compatibility.
I noticed the .platforms folder is not in the package, as told in the installation video. Also, I just add that folder path to the environment, and I get an error like this:
// Error: ImportError: file C:\Users\Lidia\Desktop\mgear-2.2.0\scripts\mGear_guidesTemplates.py line 31: No module named mgear //
The mod file has:
- MAYAVERSION:2018 PLATFORM:win64 mGear @MGEAR_MAJMIN_VERSION@ ./platforms/2018/windows/x64 scripts: ../../../../scripts
Folder ./platforms doesn't exist in the package. ../../../../scripts/ makes me think I should be putting this folder in a different path...
This is a little confusing. I'm not able to make it work.
Sorry in advance for the long answer :)
This is my fix on Windows (I use v2.6.1) but I guess It should work with v2.2 as well:
I create a mGear folder inside "c:\Users\USERNAME\Documents\maya\modules" (you may not have one so create it, Maya looks for modules inside this folder by default, so you do not have to do anything), so I have "c:\Users\USERNAME\Documents\maya\modules\mGear". I put the (platforms, scripts, tests) folders inside:
c:\Users\USERNAME\Documents\maya\modules\mGear\platforms
c:\Users\USERNAME\Documents\maya\modules\mGear\scripts
c:\Users\USERNAME\Documents\maya\modules\mGear\tests
Edit the mGear.mod file and change "./platforms" for "./mGear/platforms", ex:
- MAYAVERSION:2018 PLATFORM:win64 mGear 2.6 ./mGear/platforms/2018/windows/x64 scripts: ../../../../scripts
and place it "c:\Users\USERNAME\Documents\maya\modules\mGear.mod"
This is a bit cumbersome and confusing as is, and is even more if you are used to Maya's modules. So, in my humble opinion, ideally, the structure of the mGear releases should be:
c:\Users\USERNAME\Documents\maya\modules\mGear.mod
c:\Users\USERNAME\Documents\maya\modules\mGear\platforms
c:\Users\USERNAME\Documents\maya\modules\mGear\scripts
c:\Users\USERNAME\Documents\maya\modules\mGear\tests\
and the contents of the mGear.mod file should be changed to reflect that change as I explained above
- MAYAVERSION:2018 PLATFORM:win64 mGear 2.6 ./mGear/platforms/2018/windows/x64 scripts: ../../../../scripts
This way you can just decompress the mGear release inside your Maya's default modules folder "c:\Users[USERNAME]\Documents\maya\modules" and it should work without having to edit anything.
Explanation:
Yes, the module file expects that the mGear folder is in fact one of the paths that Maya looks for modules.
I think the module structure should be changed to make the installation work out of the box without having to add the folder where mGear folders are (platforms, scripts,tests) to the Maya's module paths, and be able to use Maya's default module folders.
// run this to get the paths where maya looks for modules (MEL) getenv "MAYA_MODULE_PATH"
On windows for example "c:\Users\USERNAME\Documents\maya\modules" is the default folder for modules that works with every Maya version you have installed. Also each Maya version may have its own folder: i.e. "c:\Users\USERNAME\Documents\maya\2018\modules"
If this folders exist Maya looks for modules inside without having to add it to "MAYA_MODULE_PATH" environment variable.
Cheers and I hope you can make it work.
Lo dicho, que espero que te sirva de ayuda. La verdad que es un rollo pero es lo que hay :)
Hola @lidiamartinez
I guess you are getting the release from GitHub? correct? The old releases in GitHub are the automatic ones when you tag. but is not the correct deploy with the final folder structure. I use Scons to release the final version.
I have added the correct release for version 2.2.1 https://github.com/mgear-dev/mgear/releases/tag/v2.2.1
btw: the new version should be compatible with the old guides. Just need to update the guide:
or is compatibility issue is another thing?
anyway, just let me know if you need another version, I will add it to GitHub.
@craGato thanks for the explanation :)
Cheers, Miquel