Hello everyone, I am trying to import the googlemaps module into Houdini, but having no luck so far.
Has anyone ever tried to import external Python Modules into Houdini, any sort of help would be great.
Thanks a lot!
Importing external Python modules into Houdini
14349 7 3- MrReedSmith
- Member
- 49 posts
- Joined: 9月 2013
- Offline
- Enivob
- Member
- 2633 posts
- Joined: 6月 2008
- Offline
If you are getting unknown module errors or some thing similar to that on import it may be something as simple as a pathing error.
You can manually add a specific path to your system at runtime before you attempt to import any module by using the sys.path.append feature of python. Check out the docs on this.
EXAMPLE:
sys.path.append(“./lib”)
import pyluxcore
You can manually add a specific path to your system at runtime before you attempt to import any module by using the sys.path.append feature of python. Check out the docs on this.
EXAMPLE:
sys.path.append(“./lib”)
import pyluxcore
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
- mandrake0
- Member
- 644 posts
- Joined: 6月 2006
- Offline
made a simple example where you can insert the python modules in the houdini user profile folder: https://youtu.be/xoVORgBT190 [youtu.be]
- MrReedSmith
- Member
- 49 posts
- Joined: 9月 2013
- Offline
Thanks a lot for the reply guys, but the problem does not seem to be iim importing the module “googlemaps”, the problem is that the class “GoogleMaps” in the module “googlemaps” is not callable
So when I say:
>> import googlemaps
it imports the module, since there is no traceback error for that statement
but when i do the following:
>> from googlemaps import GoogleMaps
it gives an error:
Traceback (most recent call last):
File “<console>”, line 1, in <module>
ImportError: cannot import name GoogleMaps
Do you guys know what could be the reason for this??
Thanks again!
So when I say:
>> import googlemaps
it imports the module, since there is no traceback error for that statement
but when i do the following:
>> from googlemaps import GoogleMaps
it gives an error:
Traceback (most recent call last):
File “<console>”, line 1, in <module>
ImportError: cannot import name GoogleMaps
Do you guys know what could be the reason for this??
Thanks again!
- Enivob
- Member
- 2633 posts
- Joined: 6月 2008
- Offline
- Kfinla
- Member
- 100 posts
- Joined: 8月 2014
- Offline
- mrWolf
- Member
- 22 posts
- Joined: 6月 2006
- Offline
I'm appending the path where the python module lives via houdini15.0/scripts/python/pythonrc.py
import sys
sys.path.append('…./path')
This works well for me importing external modules into any houdini context , included HDA.
The problem I'm having is that when I update the external module, I have to re-start Houdini to have the HDA pick up the changes.
Is there any way to re-source an external Python module from within an HDA
?
import sys
sys.path.append('…./path')
This works well for me importing external modules into any houdini context , included HDA.
The problem I'm having is that when I update the external module, I have to re-start Houdini to have the HDA pick up the changes.
Is there any way to re-source an external Python module from within an HDA
?
Alessandro Pepe
http://www.alessandropepe.com [www.alessandropepe.com]
http://pepefx.blogspot.com [pepefx.blogspot.com]
http://www.alessandropepe.com [www.alessandropepe.com]
http://pepefx.blogspot.com [pepefx.blogspot.com]
- gui2one
- Member
- 101 posts
- Joined: 2月 2015
- Offline
-
- Quick Links