I have recently been doing some Maya Plugin-in development, and in order to link against their API's added this to my ~/.bashrc
: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/autodesk/maya/lib
This worked well and now all of the shared libraries are reported as found when running ldd.
However a side effect of this is that I know receive an error when running python from the shell:
$> python
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site
I presume this is due to the python2.7 that is packaged with maya and found at /usr/autodesk/maya/lib
, there are no issues when running python3. Is there a way for me to fix this without having to conditionally add and remove from my LD_LIBRARY_PATH
?
尝试这个:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/autodesk/maya/lib/python2.7/site-packages:/usr/autodesk/maya/lib
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.