Python Modules in System Environment Variable ?

341 views
Skip to first unread message

Christopher.

unread,
Mar 28, 2016, 10:00:37 PM3/28/16
to Python Programming for Autodesk Maya
I have Python 2.6 (26) & Python 2.7 (27) installed, what is the path used for the modules to append to a system environment variable; C:\Python27\modules\modules ? 

Geordie Martinez

unread,
Mar 29, 2016, 12:17:18 AM3/29/16
to python_inside_maya
If I were you I'd just install Anaconda and let Anaconda deal with appending variables based on versions.


On Mon, Mar 28, 2016 at 7:00 PM, Christopher. <crestchr...@gmail.com> wrote:
I have Python 2.6 (26) & Python 2.7 (27) installed, what is the path used for the modules to append to a system environment variable; C:\Python27\modules\modules ? 

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/9a38daef-9c8e-4d80-8db3-52411b381dd0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Crest Christopher

unread,
Mar 29, 2016, 12:36:22 AM3/29/16
to python_in...@googlegroups.com
Thanks for the info.  ;-)

I just want to know what is the path used so I can append it to my system environment variable MAYA_APP_DIR so Python modules are loaded by default for Maya.



Tuesday, March 29, 2016 12:17 AM
If I were you I'd just install Anaconda and let Anaconda deal with appending variables based on versions.



--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CABPXW4jT6N6L91Kb7DTkZiOijy6ASNDm0pOCUKWUXrXnCMqNPw%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.
Monday, March 28, 2016 10:00 PM
I have Python 2.6 (26) & Python 2.7 (27) installed, what is the path used for the modules to append to a system environment variable; C:\Python27\modules\modules ? 
--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.

Geordie Martinez

unread,
Mar 29, 2016, 1:02:06 AM3/29/16
to python_inside_maya
You can add them to your userSetup.mel or userSetup.py files in your scripts directory.
just add it like this:

userSetup.mel:

python("import sys;sys.path.append('S:/python');sys.path.append('X:/some/path/python');");


As soon as Maya loads the path(s) will be available. this is the easiest way. And you can have it load any modules there you want to load automatically. 
if you have a package you would like to load, then it's best to put it in the site-packages directory in your maya install
 

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/56FA063B.4090507%40gmail.com.

Christopher.

unread,
Mar 29, 2016, 9:49:24 PM3/29/16
to Python Programming for Autodesk Maya
I have two question, one of these paths are incorrect; I'm leaning towards the second path as I didn't quite understand the pseudo path X:\some\path\python, whether I should just enter the same path, as in C:\Python again; as I said, I'm probably mis-understanding !

python("import sys;sys.path.append('C:\Python27');sys.path.append('C:\Python27');");


On Tuesday, March 29, 2016 at 1:02:06 AM UTC-4, Geordie Martinez wrote:
You can add them to your userSetup.mel or userSetup.py files in your scripts directory.
just add it like this:

userSetup.mel:

python("import sys;sys.path.append('S:/python');sys.path.append('X:/some/path/python');");


As soon as Maya loads the path(s) will be available. this is the easiest way. And you can have it load any modules there you want to load automatically. 
if you have a package you would like to load, then it's best to put it in the site-packages directory in your maya install
 
On Mon, Mar 28, 2016 at 9:36 PM, Crest Christopher <crestchr...@gmail.com> wrote:
Thanks for the info.  ;-)

I just want to know what is the path used so I can append it to my system environment variable MAYA_APP_DIR so Python modules are loaded by default for Maya.



Tuesday, March 29, 2016 12:17 AM
If I were you I'd just install Anaconda and let Anaconda deal with appending variables based on versions.



--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.
Monday, March 28, 2016 10:00 PM
I have Python 2.6 (26) & Python 2.7 (27) installed, what is the path used for the modules to append to a system environment variable; C:\Python27\modules\modules ? 
--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

Justin Israel

unread,
Mar 30, 2016, 3:08:58 AM3/30/16
to Python Programming for Autodesk Maya

He was just showing you how to append any number of paths,if your have multiple locations. It sounds like you only need one.


On Wed, 30 Mar 2016 2:49 PM Christopher. <crestchr...@gmail.com> wrote:
I have two question, one of these paths are incorrect; I'm leaning towards the second path as I didn't quite understand the pseudo path X:\some\path\python, whether I should just enter the same path, as in C:\Python again; as I said, I'm probably mis-understanding !

python("import sys;sys.path.append('C:\Python27');sys.path.append('C:\Python27');");


On Tuesday, March 29, 2016 at 1:02:06 AM UTC-4, Geordie Martinez wrote:
You can add them to your userSetup.mel or userSetup.py files in your scripts directory.
just add it like this:

userSetup.mel:

python("import sys;sys.path.append('S:/python');sys.path.append('X:/some/path/python');");


As soon as Maya loads the path(s) will be available. this is the easiest way. And you can have it load any modules there you want to load automatically. 
if you have a package you would like to load, then it's best to put it in the site-packages directory in your maya install
 
On Mon, Mar 28, 2016 at 9:36 PM, Crest Christopher <crestchr...@gmail.com> wrote:
Thanks for the info.  ;-)

I just want to know what is the path used so I can append it to my system environment variable MAYA_APP_DIR so Python modules are loaded by default for Maya.



Tuesday, March 29, 2016 12:17 AM
If I were you I'd just install Anaconda and let Anaconda deal with appending variables based on versions.



--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
Monday, March 28, 2016 10:00 PM
I have Python 2.6 (26) & Python 2.7 (27) installed, what is the path used for the modules to append to a system environment variable; C:\Python27\modules\modules ? 
--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/cb713ad4-8a41-4daf-bfa4-5c9c5c144e49%40googlegroups.com.

Christopher.

unread,
Mar 30, 2016, 8:05:16 AM3/30/16
to Python Programming for Autodesk Maya
I have a custom MAYA_APP_DIR in the system environment variable to which that creates a custom default maya installation path, rather it being MyDocuments>Maya>etc in Windows it defaults to the custom Maya path, which contains as the default Maya path

2015-x64
- prefs
- presets
- scripts
etc

 I didn't have a userSetup.mel file in the Custom 2015-x64 > scripts path in Windows so I simply created it, placed the following path & code within; python("import sys;sys.path.append('C:\Python27\modules'); restarted Maya, attempted to start a Python script which searched for Python modules and nothing ?




On Wednesday, March 30, 2016 at 3:08:58 AM UTC-4, Justin Israel wrote:

He was just showing you how to append any number of paths,if your have multiple locations. It sounds like you only need one.


On Wed, 30 Mar 2016 2:49 PM Christopher. <crestchr...@gmail.com> wrote:
I have two question, one of these paths are incorrect; I'm leaning towards the second path as I didn't quite understand the pseudo path X:\some\path\python, whether I should just enter the same path, as in C:\Python again; as I said, I'm probably mis-understanding !

python("import sys;sys.path.append('C:\Python27');sys.path.append('C:\Python27');");


On Tuesday, March 29, 2016 at 1:02:06 AM UTC-4, Geordie Martinez wrote:
You can add them to your userSetup.mel or userSetup.py files in your scripts directory.
just add it like this:

userSetup.mel:

python("import sys;sys.path.append('S:/python');sys.path.append('X:/some/path/python');");


As soon as Maya loads the path(s) will be available. this is the easiest way. And you can have it load any modules there you want to load automatically. 
if you have a package you would like to load, then it's best to put it in the site-packages directory in your maya install
 
On Mon, Mar 28, 2016 at 9:36 PM, Crest Christopher <crestchr...@gmail.com> wrote:
Thanks for the info.  ;-)

I just want to know what is the path used so I can append it to my system environment variable MAYA_APP_DIR so Python modules are loaded by default for Maya.



Tuesday, March 29, 2016 12:17 AM
If I were you I'd just install Anaconda and let Anaconda deal with appending variables based on versions.



--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.
Monday, March 28, 2016 10:00 PM
I have Python 2.6 (26) & Python 2.7 (27) installed, what is the path used for the modules to append to a system environment variable; C:\Python27\modules\modules ? 
--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

Justin Israel

unread,
Mar 30, 2016, 2:20:11 PM3/30/16
to Python Programming for Autodesk Maya

Does your script or dependency live under Python27/modules? Or does it live under
Python27/Lib/site-packages?


To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
Monday, March 28, 2016 10:00 PM
I have Python 2.6 (26) & Python 2.7 (27) installed, what is the path used for the modules to append to a system environment variable; C:\Python27\modules\modules ? 
--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/5516d024-21d5-4da6-9405-37a6503d474b%40googlegroups.com.

Christopher.

unread,
Mar 30, 2016, 3:00:40 PM3/30/16
to Python Programming for Autodesk Maya
If you were implying that I should use the path Python27/Lib/site-packages instead of Python27/modules; I tried the change but the result was the same.

As I stated in my original post, I don't recall the Python path which I had in my environment system path; what I can recall is, whatever path is was, any and all Python scripts would simply execute because as we all know, the python modules were found to run the scripts.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.
Monday, March 28, 2016 10:00 PM
I have Python 2.6 (26) & Python 2.7 (27) installed, what is the path used for the modules to append to a system environment variable; C:\Python27\modules\modules ? 
--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

Justin Israel

unread,
Mar 30, 2016, 3:11:31 PM3/30/16
to Python Programming for Autodesk Maya


On Thu, 31 Mar 2016 8:00 AM Christopher. <crestchr...@gmail.com> wrote:
If you were implying that I should use the path Python27/Lib/site-packages instead of Python27/modules; I tried the change but the result was the same.

As I stated in my original post, I don't recall the Python path which I had in my environment system path; what I can recall is, whatever path is was, any and all Python scripts would simply execute because as we all know, the python modules were found to run the scripts.

I'm having trouble following your language. I can't agree with the claim of what "we we all all know" because I didn't understand it. 

Where is the script or dependency you need, located on your system? You are are trying to import a script in Maya and something is failing. Where did you put it?
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
Monday, March 28, 2016 10:00 PM
I have Python 2.6 (26) & Python 2.7 (27) installed, what is the path used for the modules to append to a system environment variable; C:\Python27\modules\modules ? 
--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/c5219c9d-5eb2-4b60-823f-48bc1485d43c%40googlegroups.com.

Christopher.

unread,
Mar 30, 2016, 3:41:38 PM3/30/16
to Python Programming for Autodesk Maya
I meant, what we all know, in other words, if scripts can't find python modules, most of the time they won't execute.

All python scripts are relying on Python modules, as I mentioned I had the Python module path in my system environment variable; but since deleted it from my system environment variable.  Prior to deleting the path, any and all Python scripts in my custom path would work, thereafter deletion of the path from my system environment variable, they stopped working.  

Geordie mentioned to put the script path as he posted, rather then in my system environment variable into a userSetup.mel file then those modules would load and hopefully all my python scripts would begin working, once again; up to this point, that is not the case and I'd like to know what I'm doing wrong or what has become tangled so to speak ?
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.
Monday, March 28, 2016 10:00 PM
I have Python 2.6 (26) & Python 2.7 (27) installed, what is the path used for the modules to append to a system environment variable; C:\Python27\modules\modules ? 
--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

Christopher.

unread,
Apr 1, 2016, 3:04:05 PM4/1/16
to Python Programming for Autodesk Maya
The userSetup.mel file is located in; C:\<custom folder>\<custom folder>\Preferences\2015-x64\scripts
Since I never had a userSetup.mel file; the following is the only line within: python("import sys;sys.path.append('C:\Python27\Lib\site-packages');

When restarting Maya, all Python scripts don't work, the Python modules continue not to be found ?

Justin Israel

unread,
Apr 1, 2016, 3:06:28 PM4/1/16
to Python Programming for Autodesk Maya
Are you python scripts inside that location?

To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
Monday, March 28, 2016 10:00 PM
I have Python 2.6 (26) & Python 2.7 (27) installed, what is the path used for the modules to append to a system environment variable; C:\Python27\modules\modules ? 
--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/360602d4-c5b4-4273-bf75-02a6be2cb1d4%40googlegroups.com.

Crest Christopher

unread,
Apr 1, 2016, 4:21:06 PM4/1/16
to python_in...@googlegroups.com
No.

When I had a system environment variable set for Python modules, I didn't have all the Python scripts in the Python modules path and the scripts worked perfectly.

Justin Israel wrote:

Are you python scripts inside that location?

On Sat, Apr 2, 2016 at 8:04 AM Christopher.
<crestchr...@gmail.com <mailto:crestchr...@gmail.com>> wrote:

    The userSetup.mel file is located in; C:\<custom folder>\<custom
    folder>\Preferences\2015-x64\scripts
    Since I never had a userSetup.mel file; the following is the only
    line within: python("import
    sys;sys.path.append('C:\Python27\Lib\site-packages');

    When restarting Maya, all Python scripts don't work, the Pyth on
    modules continue not to be found ?


    On Wednesday, March 30, 2016 at 3:41:38 PM UTC-4, Christopher. wrote:

        I meant, /what we all know/, in other words, if scripts can't
        find python modules, /most/ of the time they won't execute.


        All python scripts are relying on Python modules, as I
        mentioned I had the Python module path in my system
        environment variable; but since deleted it from my system
        environment variable.  Prior to deleting the path, any and all
        Python scripts in my custom path would work, thereafter
        deletion of the path from my system environment variable, they
        stopped working.

        Geordie mentioned to put the script path as he posted, rather
        then in my system environment variable into a userSetup.mel
        file then those modules would load and hopefully all my python
        scripts would begin working, once again; up to this point,
        that is not the case and I'd like to know what I'm doing wrong
        or what has become tangled so to speak ?

        On Wednesday, March 30, 2016 at 3:11:31 PM UTC-4, Justin
        Israel wrote:



            O n Thu, 31 Mar 2016 8:00 AM Christopher.

            <crestchr...@gmail.com> wrote:

                If you were implying that I should use the path
                Python27/Lib/site-packages instead of
                Python27/modules; I tried the change but the result
                was the same.

                As I stated in my original post, I don't recall the
                Python path which I had in my environment system path;
                what I can recall is, whatever path is was, any and
                all Python scripts would simply execute because as we
                all know, the python modules were found to run the
                scripts.


            I'm having trouble following your language. I can't agree
            with the claim of what "we we all all know" because I
            didn't understand it.

            Where is the s cript or dependency you need, located on

            your system? You are are trying to import a script in Maya
            and something is failing. Where did you put it?



                On Wednesday, March 30, 2016 at 2:20:11 PM UTC-4,
                Justin Israel wrote:

                    Does your script or dependency live under
                    Python27/modules? Or does it live under
               &nbsp ;    Python27/Lib/site-packages?



                    On Thu, 31 Mar 2016 1:05 AM Christopher.
                    <crestchr...@gmail.com> wrote:

                        I have a custom MAYA_APP_DIR in the system
                        environment variable to which that creates a
                        custom default maya installation path, rather
       &n bsp;                it being MyDocuments>Maya>etc in Windows it

                        defaults to the custom Maya path, which
                        contains as the default Maya path

                        2015-x64
                        - prefs
                        - presets
   &n bsp;                    - scripts

                        etc

                         I didn't have a userSetup.mel file in the
                        Custom 2015-x64 > scripts path in Windows so I
                        simply created it, placed the following path &
                     & nbsp;  code within; python("import

                        sys;sys.path.append('C:\Python27\modules');
                        restarted Maya, attempted to start a Python
                        script which searched for Python modules and
                        nothing ?




                        On Wednesday, March 30, 2016 at 3:08:58 AM
    & nbsp;                   UTC-4, Justin Israel wrote:

                            He was just showing you how to append any
                            number of paths,if your have multiple
                            locations. It sounds like you only need one.


                            On Wed, 30 Mar 2016 2:49 PM Christopher.
                            <crestchr...@gmail.com> wrote:

                                I have two question, one of these
                                paths are incorrect; I'm leaning
                                towards the second path as I didn't
                &nbs p;               quite understand the pseudo path

                                X:\some\path\python, whether I should
                                just enter the same path, as in
                                C:\Python again; as I said, I'm
                                prob ably mis-understanding !


                                python("import
                                sys;sys.path.append('C:\Python27');sys.path.append('C:\Python27');");


                                On Tuesday, March 29, 2016 at 1:02:06
                                AM UTC-4, Geordie Martinez wrote:

   &n bsp;                                You can add them to your

                                    userSetup.mel or userSetup.py
                                    files in your scripts directory.
                                    just add it like this:

     &nbs p;                              userSetup.mel:


                                    |python("import
                                    sys;sys.path.append('S:/python');sys.path.append('X:/some/path/python');");|

                                    ​

      & nbsp;                             As soon as Maya loads the path(s)

                                    will be available. this is the
                                    easiest way. And you can have it
                                    load any modules there you want to
     &nbs p;                              load automatically.

                                    if you have a package you would
                                    like to load, then it's best to
                                    put it in the site-packages
        &nbs p;                           directory in your maya install



                                    On Mon, Mar 28, 2016 at 9:36 PM,
                                    Crest Christopher
                                    <crestchr...@gmail.com> wrote:

                                         Thanks for the info.  ;-)

                                        I just want to know what is
                                        the path used so I can append
                                     &nbsp ;  it to my system environment

                                        variable MAYA_APP_DIR so
                                        Python modules are loaded by
                                        default for Maya.




                   &nb sp;                    Geordie Martinez

                                        Tuesday, March 29, 2016 12:17 AM
                                        If I were you I'd just
                                        install Anaconda and let
        &nbsp ;                               Anaconda deal with appending

                                        variables based on versions.

                                        https://www.continuum.io/downloads


                                    &n bsp;   --
                                        You received this message
                                        because you are subscribed to
                                        a topic in the Google Groups
                           & nbsp;            "Python Programming for

                                        Autodesk Maya" group.
                                        To unsubscribe from this
                                        topic, visit
                  &nbsp ;                     https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.

                                        To unsubscribe from this
                                        group and all its topics,
                                        send an email to
& nbsp;                                       python_inside_m...@googlegroups.com.

                                        To view this discussion on
                                        the web visit
                              &nbs p;         https://groups.google.com/d/msgid/python_inside_maya/CABPXW4jT6N6L91Kb7DTkZiOijy6ASNDm0pOCUKWUXrXnCMqNPw%40mail.gmail.com
                                        <https://groups.google.com/d/msgid/python_inside_maya/CABPXW4jT6N6L91Kb7DTkZiOijy6ASNDm0pOCUKWUXrXnCMqNPw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
                                        For more options, visit
                       &nb sp;                https://groups.google.com/d/optout.

                                        Christopher.
                                        Monday, March 28, 2016 10:00 PM
                                        I have Python 2.6 (26) &
          &nbsp ;                             Python 2.7 (27) installed,

                                        what is the path used for the
                                        modules to append to a system
                                        environment
                                        variable; C:\Python27\modules\modules
                                        ?
                                        --
                                      & nbsp; You received this message

                                        because you are subscribed to
                                        a topic in the Google Groups
                                        "Python Programming for
                         &nbs p;              Autodesk Maya" group.

                                        To unsubscribe from this
                                        topic, visit
                                        https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
        &n bsp;                               To unsubscribe from this

                                        group and all its topics,
                                        send an email to
                                        python_inside_maya+u nsubs...@googlegroups.com.

                                        To view this discussion on
                                        the web visit

                                        For more options, visit
                                        https://groups.google.com/d/optout.


                    &nb sp;                   --
                                        You received this message
                                        because you are subscribed to
                                        the Google Groups "Python
           &nbsp ;                            Programming for Autodesk Maya"

                                        group.
                                        To unsubscribe from this group
                                        and stop receiving emails from
&nbsp ;                                       it, send an email to

                                        python_inside_m...@googlegroups.com.
                                        To view this discussion on the
                             &nb sp;          web visit
                                        https://groups.google.com/d/msgid/python_inside_maya/56FA063B.4090507%40gmail.com
                                        <https://groups.google.com/d/msgid/python_inside_maya/56FA063B.4090507%40gmail.com?utm_medium=email&utm_source=footer>.

                                     & nbsp;  For more options, visit

                                        https://groups.google.com/d/optout.


                                --
                                You received this message because you
                                are subscribed to the Google Groups
  &n bsp;                             "Python Programming for Autodesk Maya"

                                group.
                                To unsubscribe from this group and
                                stop receiving emails from it, send an
                                 email to
                                python_inside_m...@googlegroups.com.
                                To view this discussion on the web
                                visit

                                For more options, visit
                                https://groups.google.com/d/optout.

                        --
                        You received this message because you are
                        subscribed to the Google Groups "Python
                        Programming for Autodesk Maya" group.
                        To unsubscribe from this group and stop
                        receiving emails from it, send an email to
           & nbsp;            python_inside_m...@googlegroups.com.

                        To view this discussion on the web visit
                        https://groups.google.com/d/msgid/python_inside_maya/5516d024-21d5-4da6-9405-37a6503d474b%40googlegroups.com
                        <https://groups.google.com/d/msgid/python_inside_maya/5516d024-21d5-4da6-9405-37a6503d474b%40googlegroups.com?utm_medium=email&utm_source=footer>.
                     &nb sp;  For more options, visit

                        https://groups.google.com/d/optout.

                --
                You received this message because you are subscribed
                to the Google Groups "Python Programming for Autodesk
                Maya" group.
                To unsubscribe from this group and stop receiving
                emails from it, send an emai l to

                python_inside_m...@googlegroups.com.
                To view this discussion on the web visit

                For more options, visit
                https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google
    Groups "Python Programming for Autodesk Maya" group.
    To unsubscribe from this group and stop receiving emails from it,
    send an email to python_inside_m...@googlegroups.com

    To view this discussion on the web visit

    For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribe d to a topic in the
Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
python_inside_m...@googlegroups.com

To view this discussion on the web visit

Justin Israel

unread,
Apr 1, 2016, 4:26:19 PM4/1/16
to python_in...@googlegroups.com

Let's just cut to the chase and you tell me where your scripts *are* located?
Obviously your standard environment has those locations in the PYTHONPATH and Maya's env does not.

It isn't a complicated concept. If you add the locationa of your scripts and dependencies to the sys.path in Maya, then you should be able to import your scripts


To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/56FED818.90800%40gmail.com.

Christopher.

unread,
Apr 1, 2016, 4:58:02 PM4/1/16
to Python Programming for Autodesk Maya
The PYTHONPATH environment variable is within the Maya.env file with a absolute path. 

python("import sys;sys.path.append('C:\Python27\Lib\site-packages');

The above line, is the only line in my userSetup.mel file, when Maya starts shouldn't it read that line, find the Python Modules, then I simply run any Python script and the script runs, it sounds that simple but it's not working out that simple ?
& nbsp;                                       python_inside_maya+unsub...@googlegroups.com.

                                        python_inside_maya+unsub...@googlegroups.com.

                                        To view this discussion on the
                             &nb sp;          web visit
                                        https://groups.google.com/d/msgid/python_inside_maya/56FA063B.4090507%40gmail.com
                                        <https://groups.google.com/d/msgid/python_inside_maya/56FA063B.4090507%40gmail.com?utm_medium=email&utm_source=footer>.

                                     & nbsp;  For more options, visit

                                        https://groups.google.com/d/optout.


                                --
                                You received this message because you
                                are subscribed to the Google Groups
  &n bsp;                             "Python Programming for Autodesk Maya"

                                group.
                                To unsubscribe from this group and
                                stop receiving emails from it, send an
                                 email to
                                python_inside_maya+unsub...@googlegroups.com.

                                To view this discussion on the web
                                visit

                                For more options, visit
                                https://groups.google.com/d/optout.

                        --
                        You received this message because you are
                        subscribed to the Google Groups "Python
                        Programming for Autodesk Maya" group.
                        To unsubscribe from this group and stop
                        receiving emails from it, send an email to
           & nbsp;            python_inside_maya+unsub...@googlegroups.com.

                        To view this discussion on the web visit
                        https://groups.google.com/d/msgid/python_inside_maya/5516d024-21d5-4da6-9405-37a6503d474b%40googlegroups.com
                        <https://groups.google.com/d/msgid/python_inside_maya/5516d024-21d5-4da6-9405-37a6503d474b%40googlegroups.com?utm_medium=email&utm_source=footer>.
                     &nb sp;  For more options, visit

                        https://groups.google.com/d/optout.

                --
                You received this message because you are subscribed
                to the Google Groups "Python Programming for Autodesk
                Maya" group.
                To unsubscribe from this group and stop receiving
                emails from it, send an emai l to

                python_inside_maya+unsub...@googlegroups.com.

                To view this discussion on the web visit

                For more options, visit
                https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google
    Groups "Python Programming for Autodesk Maya" group.
    To unsubscribe from this group and stop receiving emails from it,
Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

Crest Christopher

unread,
Apr 1, 2016, 6:08:59 PM4/1/16
to python_in...@googlegroups.com
I don't know what else to explain. Have I missed a piece of information you want ?

Friday, April 01, 2016 4:26 PM

Let's just cut to the chase and you tell me where your scripts *are* located?
Obviously your standard environment has those locations in the PYTHONPATH and Maya's env does not.

It isn't a complicated concept. If you add the locationa of your scripts and dependencies to the sys.path in Maya, then you should be able to import your scripts


--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2FDNvxBZLYWDQ8RPxRiGAbV8o2bxR9j6HV50CeLfjcVg%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.
Friday, April 01, 2016 4:20 PM
No.

When I had a system environment variable set for Python modules, I didn't have all the Python scripts in the Python modules path and the scripts worked perfectly.

Justin Israel wrote:
Friday, April 01, 2016 3:06 PM
Are you python scripts inside that location?

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1N%3Dh7iG8hd6JMUosF%3DUQJruTaXQPo5LpZMhz2v6ywyNQ%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.
Friday, April 01, 2016 3:04 PM
The userSetup.mel file is located in; C:\<custom folder>\<custom folder>\Preferences\2015-x64\scripts
Since I never had a userSetup.mel file; the following is the only line within: python("import sys;sys.path.append('C:\Python27\Lib\site-packages');

When restarting Maya, all Python scripts don't work, the Python modules continue not to be found ?


On Wednesday, March 30, 2016 at 3:41:38 PM UTC-4, Christopher. wrote:
--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/360602d4-c5b4-4273-bf75-02a6be2cb1d4%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Wednesday, March 30, 2016 3:41 PM
I meant, what we all know, in other words, if scripts can't find python modules, most of the time they won't execute.

All python scripts are relying on Python modules, as I mentioned I had the Python module path in my system environment variable; but since deleted it from my system environment variable.  Prior to deleting the path, any and all Python scripts in my custom path would work, thereafter deletion of the path from my system environment variable, they stopped working.  

Geordie mentioned to put the script path as he posted, rather then in my system environment variable into a userSetup.mel file then those modules would load and hopefully all my python scripts would begin working, once again; up to this point, that is not the case and I'd like to know what I'm doing wrong or what has become tangled so to speak ?

On Wednesday, March 30, 2016 at 3:11:31 PM UTC-4, Justin Israel wrote:
--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/39e7a01d-bbee-41a5-9bd3-bff14f1fa874%40googlegroups.com.

Justin Israel

unread,
Apr 1, 2016, 7:50:04 PM4/1/16
to python_in...@googlegroups.com

Yes it would work as long as your scripts are in that site packages location. What is the absolute path to your script?


You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/56FEF162.2060108%40gmail.com.

Crest Christopher

unread,
Apr 1, 2016, 7:56:40 PM4/1/16
to python_in...@googlegroups.com
That wasn't the case when the Python Module path was in my system environment variable; I didn't need to have all my Python Maya scripts in the Python Modules path location ?

Here is the absolute path for all my python scripts, same absolute path as listed in the Maya.env file for PYTHONPATH.

C:\Custom Program Settings\Maya_Resources\pythonscript

Friday, April 01, 2016 7:49 PM

Yes it would work as long as your scripts are in that site packages location. What is the absolute path to your script?


--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Friday, April 01, 2016 6:08 PM

Justin Israel

unread,
Apr 1, 2016, 10:01:41 PM4/1/16
to python_in...@googlegroups.com


On Sat, 2 Apr 2016 12:56 PM Crest Christopher <crestchr...@gmail.com> wrote:
That wasn't the case when the Python Module path was in my system environment variable; I didn't need to have all my Python Maya scripts in the Python Modules path location ?

Here is the absolute path for all my python scripts, same absolute path as listed in the Maya.env file for PYTHONPATH.

C:\Custom Program Settings\Maya_Resources\pythonscript

You can either set your PYTHONPATH from the Maya.env or the userSetup.mel 
If you add your custom scripts location to the sys.path in your userSetup.mel, does it then succeed in importing your script? 

If not, go into the script editor and run:

print '\n'.join(sys.path)

And show us the results of that 
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/56FF0A9F.20904%40gmail.com.

Christopher.

unread,
Apr 1, 2016, 10:50:55 PM4/1/16
to Python Programming for Autodesk Maya
There was extras related to other plug-ins I removed them and kept it to the relevant information to which the command spit out; hopefully this helps. 

C:/Custom Program Settings/Maya_Resources/Preferences/2015-x64/scripts/

I added the custom python scripts path to the userSetup.mel command as mentioned previously and no my scripts continue not to run. Not the custom scripts path, that is only where MEL scripts reside, rather the custom Python Script path as also in my Maya.env file as PYTHONPATH = "".


On Friday, April 1, 2016 at 10:01:41 PM UTC-4, Justin Israel wrote:


On Sat, 2 Apr 2016 12:56 PM Crest Christopher <crestchr...@gmail.com> wrote:
That wasn't the case when the Python Module path was in my system environment variable; I didn't need to have all my Python Maya scripts in the Python Modules path location ?

Here is the absolute path for all my python scripts, same absolute path as listed in the Maya.env file for PYTHONPATH.

C:\Custom Program Settings\Maya_Resources\pythonscript

You can either set your PYTHONPATH from the Maya.env or the userSetup.mel 
If you add your custom scripts location to the sys.path in your userSetup.mel, does it then succeed in importing your script? 

If not, go into the script editor and run:

print '\n'.join(sys.path)

And show us the results of that 

Friday, April 01, 2016 7:49 PM

Yes it would work as long as your scripts are in that site packages location. What is the absolute path to your script?


--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.
I don't know what else to explain. Have I missed a piece of information you want ?


Friday, April 01, 2016 4:26 PM

Let's just cut to the chase and you tell me where your scripts *are* located?
Obviously your standard environment has those locations in the PYTHONPATH and Maya's env does not.

It isn't a complicated concept. If you add the locationa of your scripts and dependencies to the sys.path in Maya, then you should be able to import your scripts


--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.
Friday, April 01, 2016 4:20 PM
No.

When I had a system environment variable set for Python modules, I didn't have all the Python scripts in the Python modules path and the scripts worked perfectly.

Justin Israel wrote:
Friday, April 01, 2016 3:06 PM
Are you python scripts inside that location?

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

Justin Israel

unread,
Apr 1, 2016, 11:37:06 PM4/1/16
to Python Programming for Autodesk Maya


On Sat, 2 Apr 2016 3:50 PM Christopher. <crestchr...@gmail.com> wrote:
There was extras related to other plug-ins I removed them and kept it to the relevant information to which the command spit out; hopefully this helps. 

C:/Custom Program Settings/Maya_Resources/Preferences/2015-x64/scripts/

You are saying that this path is the only thing in your sys.path? that can't be true. 


I added the custom python scripts path to the userSetup.mel command as mentioned previously and no my scripts continue not to run. Not the custom scripts path, that is only where MEL scripts reside, rather the custom Python Script path as also in my Maya.env file as PYTHONPATH = "".

Why are we we talking about Mel in a python question? All I I wanted to know was the absolute location of the python script that fails to import for you, and the contents of your sys.path in Maya to see where it is checking 

This is like pulling teeth. 


On Friday, April 1, 2016 at 10:01:41 PM UTC-4, Justin Israel wrote:


On Sat, 2 Apr 2016 12:56 PM Crest Christopher <crestchr...@gmail.com> wrote:
That wasn't the case when the Python Module path was in my system environment variable; I didn't need to have all my Python Maya scripts in the Python Modules path location ?

Here is the absolute path for all my python scripts, same absolute path as listed in the Maya.env file for PYTHONPATH.

C:\Custom Program Settings\Maya_Resources\pythonscript

You can either set your PYTHONPATH from the Maya.env or the userSetup.mel 
If you add your custom scripts location to the sys.path in your userSetup.mel, does it then succeed in importing your script? 

If not, go into the script editor and run:

print '\n'.join(sys.path)

And show us the results of that 

Friday, April 01, 2016 7:49 PM

Yes it would work as long as your scripts are in that site packages location. What is the absolute path to your script?


--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
I don't know what else to explain. Have I missed a piece of information you want ?


Friday, April 01, 2016 4:26 PM

Let's just cut to the chase and you tell me where your scripts *are* located?
Obviously your standard environment has those locations in the PYTHONPATH and Maya's env does not.

It isn't a complicated concept. If you add the locationa of your scripts and dependencies to the sys.path in Maya, then you should be able to import your scripts


--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
Friday, April 01, 2016 4:20 PM
No.

When I had a system environment variable set for Python modules, I didn't have all the Python scripts in the Python modules path and the scripts worked perfectly.

Justin Israel wrote:
Friday, April 01, 2016 3:06 PM
Are you python scripts inside that location?

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/6d106ea2-f86b-48ef-b1b6-20e2d9396014%40googlegroups.com.

Christopher.

unread,
Apr 1, 2016, 11:52:39 PM4/1/16
to Python Programming for Autodesk Maya


On Friday, April 1, 2016 at 11:37:06 PM UTC-4, Justin Israel wrote:


On Sat, 2 Apr 2016 3:50 PM Christopher. <crestchr...@gmail.com> wrote:
There was extras related to other plug-ins I removed them and kept it to the relevant information to which the command spit out; hopefully this helps. 

C:/Custom Program Settings/Maya_Resources/Preferences/2015-x64/scripts/

You are saying that this path is the only thing in your sys.path? that can't be true. 

The command you told me to enter in the script editor gave me numerous paths, mostly related to Maya plugins etc.  

Sorry, what do you mean by sys.path, the only path in the userSetup.mel file or my system environment variable ? 

I mentioned the MEL script path, just for some understanding on the file structure I have setup, to help understand.  

As I mentioned, no one I've brought this issue to attention was able to solve, and I'v explained the situation as deep of an explanation as possible.  If you can solve, it would be a miracle; or anyone else for that matter. I must be trying to cure black magic or so it feels like.

 


I added the custom python scripts path to the userSetup.mel command as mentioned previously and no my scripts continue not to run. Not the custom scripts path, that is only where MEL scripts reside, rather the custom Python Script path as also in my Maya.env file as PYTHONPATH = "".

Why are we we talking about Mel in a python question? All I I wanted to know was the absolute location of the python script that fails to import for you, and the contents of your sys.path in Maya to see where it is checking 

This is like pulling teeth. 


On Friday, April 1, 2016 at 10:01:41 PM UTC-4, Justin Israel wrote:


On Sat, 2 Apr 2016 12:56 PM Crest Christopher <crestchr...@gmail.com> wrote:
That wasn't the case when the Python Module path was in my system environment variable; I didn't need to have all my Python Maya scripts in the Python Modules path location ?

Here is the absolute path for all my python scripts, same absolute path as listed in the Maya.env file for PYTHONPATH.

C:\Custom Program Settings\Maya_Resources\pythonscript

You can either set your PYTHONPATH from the Maya.env or the userSetup.mel 
If you add your custom scripts location to the sys.path in your userSetup.mel, does it then succeed in importing your script? 

If not, go into the script editor and run:

print '\n'.join(sys.path)

And show us the results of that 

Friday, April 01, 2016 7:49 PM

Yes it would work as long as your scripts are in that site packages location. What is the absolute path to your script?


--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.
I don't know what else to explain. Have I missed a piece of information you want ?


Friday, April 01, 2016 4:26 PM

Let's just cut to the chase and you tell me where your scripts *are* located?
Obviously your standard environment has those locations in the PYTHONPATH and Maya's env does not.

It isn't a complicated concept. If you add the locationa of your scripts and dependencies to the sys.path in Maya, then you should be able to import your scripts


--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.
Friday, April 01, 2016 4:20 PM
No.

When I had a system environment variable set for Python modules, I didn't have all the Python scripts in the Python modules path and the scripts worked perfectly.

Justin Israel wrote:
Friday, April 01, 2016 3:06 PM
Are you python scripts inside that location?

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

Justin Israel

unread,
Apr 2, 2016, 12:04:27 AM4/2/16
to Python Programming for Autodesk Maya


On Sat, 2 Apr 2016 4:52 PM Christopher. <crestchr...@gmail.com> wrote:


On Friday, April 1, 2016 at 11:37:06 PM UTC-4, Justin Israel wrote:


On Sat, 2 Apr 2016 3:50 PM Christopher. <crestchr...@gmail.com> wrote:
There was extras related to other plug-ins I removed them and kept it to the relevant information to which the command spit out; hopefully this helps. 

C:/Custom Program Settings/Maya_Resources/Preferences/2015-x64/scripts/

You are saying that this path is the only thing in your sys.path? that can't be true. 

The command you told me to enter in the script editor gave me numerous paths, mostly related to Maya plugins etc.  

I was hoping to just see the results so you could then answer if any of those paths actually contain the python script you areare failing to import 


Sorry, what do you mean by sys.path, the only path in the userSetup.mel file or my system environment variable ? 

the result of printing that sys.path list and the thing you are appending to in your userSetup.mel


I mentioned the MEL script path, just for some understanding on the file structure I have setup, to help understand.  

As I mentioned, no one I've brought this issue to attention was able to solve, and I'v explained the situation as deep of an explanation as possible.  If you can solve, it would be a miracle; or anyone else for that matter. I must be trying to cure black magic or so it feels like.

the thing is. .. this is normally a pretty straight forward problem to solve. You append your custom locations to sys.path and away you go. the problem may be in the ability to communicate your problem and the ability to apply the suggestions you receive 


 


I added the custom python scripts path to the userSetup.mel command as mentioned previously and no my scripts continue not to run. Not the custom scripts path, that is only where MEL scripts reside, rather the custom Python Script path as also in my Maya.env file as PYTHONPATH = "".

Why are we we talking about Mel in a python question? All I I wanted to know was the absolute location of the python script that fails to import for you, and the contents of your sys.path in Maya to see where it is checking 

This is like pulling teeth. 


On Friday, April 1, 2016 at 10:01:41 PM UTC-4, Justin Israel wrote:


On Sat, 2 Apr 2016 12:56 PM Crest Christopher <crestchr...@gmail.com> wrote:
That wasn't the case when the Python Module path was in my system environment variable; I didn't need to have all my Python Maya scripts in the Python Modules path location ?

Here is the absolute path for all my python scripts, same absolute path as listed in the Maya.env file for PYTHONPATH.

C:\Custom Program Settings\Maya_Resources\pythonscript

You can either set your PYTHONPATH from the Maya.env or the userSetup.mel 
If you add your custom scripts location to the sys.path in your userSetup.mel, does it then succeed in importing your script? 

If not, go into the script editor and run:

print '\n'.join(sys.path)

And show us the results of that 

Friday, April 01, 2016 7:49 PM

Yes it would work as long as your scripts are in that site packages location. What is the absolute path to your script?


--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
I don't know what else to explain. Have I missed a piece of information you want ?


Friday, April 01, 2016 4:26 PM

Let's just cut to the chase and you tell me where your scripts *are* located?
Obviously your standard environment has those locations in the PYTHONPATH and Maya's env does not.

It isn't a complicated concept. If you add the locationa of your scripts and dependencies to the sys.path in Maya, then you should be able to import your scripts


--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
Friday, April 01, 2016 4:20 PM
No.

When I had a system environment variable set for Python modules, I didn't have all the Python scripts in the Python modules path and the scripts worked perfectly.

Justin Israel wrote:
Friday, April 01, 2016 3:06 PM
Are you python scripts inside that location?

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/43128183-8c53-4ffd-a521-c15a9c0ae85d%40googlegroups.com.

Christopher.

unread,
Apr 2, 2016, 7:28:29 AM4/2/16
to Python Programming for Autodesk Maya


On Saturday, April 2, 2016 at 12:04:27 AM UTC-4, Justin Israel wrote:


On Sat, 2 Apr 2016 4:52 PM Christopher. <crestchr...@gmail.com> wrote:


On Friday, April 1, 2016 at 11:37:06 PM UTC-4, Justin Israel wrote:


On Sat, 2 Apr 2016 3:50 PM Christopher. <crestchr...@gmail.com> wrote:
There was extras related to other plug-ins I removed them and kept it to the relevant information to which the command spit out; hopefully this helps. 

C:/Custom Program Settings/Maya_Resources/Preferences/2015-x64/scripts/

You are saying that this path is the only thing in your sys.path? that can't be true. 

The command you told me to enter in the script editor gave me numerous paths, mostly related to Maya plugins etc.  

I was hoping to just see the results so you could then answer if any of those paths actually contain the python script you areare failing to import 

The results of the command show none of the paths which contain strictly my Python Scripts.
 


Sorry, what do you mean by sys.path, the only path in the userSetup.mel file or my system environment variable ? 

the result of printing that sys.path list and the thing you are appending to in your userSetup.mel


I mentioned the MEL script path, just for some understanding on the file structure I have setup, to help understand.  

As I mentioned, no one I've brought this issue to attention was able to solve, and I'v explained the situation as deep of an explanation as possible.  If you can solve, it would be a miracle; or anyone else for that matter. I must be trying to cure black magic or so it feels like.

the thing is. .. this is normally a pretty straight forward problem to solve. You append your custom locations to sys.path and away you go. the problem may be in the ability to communicate your problem and the ability to apply the suggestions you receive 

If you knew the suggestions and how I explained the situation, to many you'd realize the frustration.  It's similar to explaining a problem to twenty different people which as I said I have, with such detail.  Anyway, the only paths to which the command is spitting out is the custom default maya scripts path, which is created from the MAYA_APP_DIR system environment variable, as I know and was also informed by others.
 


 


I added the custom python scripts path to the userSetup.mel command as mentioned previously and no my scripts continue not to run. Not the custom scripts path, that is only where MEL scripts reside, rather the custom Python Script path as also in my Maya.env file as PYTHONPATH = "".

Why are we we talking about Mel in a python question? All I I wanted to know was the absolute location of the python script that fails to import for you, and the contents of your sys.path in Maya to see where it is checking 

This is like pulling teeth. 


On Friday, April 1, 2016 at 10:01:41 PM UTC-4, Justin Israel wrote:


On Sat, 2 Apr 2016 12:56 PM Crest Christopher <crestchr...@gmail.com> wrote:
That wasn't the case when the Python Module path was in my system environment variable; I didn't need to have all my Python Maya scripts in the Python Modules path location ?

Here is the absolute path for all my python scripts, same absolute path as listed in the Maya.env file for PYTHONPATH.

C:\Custom Program Settings\Maya_Resources\pythonscript

You can either set your PYTHONPATH from the Maya.env or the userSetup.mel 
If you add your custom scripts location to the sys.path in your userSetup.mel, does it then succeed in importing your script? 

If not, go into the script editor and run:

print '\n'.join(sys.path)

And show us the results of that 

Friday, April 01, 2016 7:49 PM

Yes it would work as long as your scripts are in that site packages location. What is the absolute path to your script?


--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.
I don't know what else to explain. Have I missed a piece of information you want ?


Friday, April 01, 2016 4:26 PM

Let's just cut to the chase and you tell me where your scripts *are* located?
Obviously your standard environment has those locations in the PYTHONPATH and Maya's env does not.

It isn't a complicated concept. If you add the locationa of your scripts and dependencies to the sys.path in Maya, then you should be able to import your scripts


--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.
Friday, April 01, 2016 4:20 PM
No.

When I had a system environment variable set for Python modules, I didn't have all the Python scripts in the Python modules path and the scripts worked perfectly.

Justin Israel wrote:
Friday, April 01, 2016 3:06 PM
Are you python scripts inside that location?

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

Christopher.

unread,
Apr 2, 2016, 7:39:47 AM4/2/16
to Python Programming for Autodesk Maya
Any Python script I run in Maya gives me an error; related to no Modules named, then whatever the script name is.  At first I though it was the fact that Maya couldn't find the script, after running this problem though almost twenty people, and realizing, it was because the Python modules for the System Environment variable were removed, numerous suggestions were to place the Python Modules path back into the System Environment Variable and all should work again, unfortunately not the case.

Then one of the suggestions when posting on this group was to place a python command it in the userSetup.mel, enter the path name to which where my python scripts are stored on my system restart Maya and those python scripts should work as they can find the Python modules, that as well is not the case and didn't work.

Justin Israel

unread,
Apr 2, 2016, 5:05:08 PM4/2/16
to python_in...@googlegroups.com
On Sun, Apr 3, 2016 at 12:28 AM Christopher. <crestchr...@gmail.com> wrote:


On Saturday, April 2, 2016 at 12:04:27 AM UTC-4, Justin Israel wrote: 

I was hoping to just see the results so you could then answer if any of those paths actually contain the python script you areare failing to import 

The results of the command show none of the paths which contain strictly my Python Scripts.

Something is not adding up here.
When I do the following test:

*scripts/userSetup.mel*

python("import sys; sys.path.append('FOO/BAR')")

Then I launch maya and do:   print '\n'.join(sys.path)

I see all of the other Maya paths, and the last line is "FOO/BAR".
If you are not seeing your path at the end of a bunch of other lines, something is strange. Did you check the top of your script editor for errors when Maya was first launched?

Similarly, if I completely remove userSetup.py and create userSetup.py in its place (something I actually do anyways, as I use a py instead of a mel script), I can do this:

import sys
sys.path.append("FOO/BAR")

And when Maya launches and I print the sys.path, I still see "FOO/BAR" as the last line. 
 
 


Sorry, what do you mean by sys.path, the only path in the userSetup.mel file or my system environment variable ? 

the result of printing that sys.path list and the thing you are appending to in your userSetup.mel


the thing is. .. this is normally a pretty straight forward problem to solve. You append your custom locations to sys.path and away you go. the problem may be in the ability to communicate your problem and the ability to apply the suggestions you receive 
If you knew the suggestions and how I explained the situation, to many you'd realize the frustration.  It's similar to explaining a problem to twenty different people which as I said I have, with such detail.  Anyway, the only paths to which the command is spitting out is the custom default maya scripts path, which is created from the MAYA_APP_DIR system environment variable, as I know and was also informed by others.

I can fully appreciate how frustrating this must be for you when multiple people have given you suggestions and you cannot manage to arrive at a working solution. It is also pretty challenging for the people making the suggestions, when they feel they are giving a simple answer to a seemingly simple problem and don't hear reasonable outcomes reported back from the implementation of those suggestions.

You made reference previously to altering your Maya.env file. Have you set the value of PYTHONPATH within your Maya.env file? That is another way to modify Maya's PYTHONPATH.
 
 


 


I added the custom python scripts path to the userSetup.mel command as mentioned previously and no my scripts continue not to run. Not the custom scripts path, that is only where MEL scripts reside, rather the custom Python Script path as also in my Maya.env file as PYTHONPATH = "".

Why are we we talking about Mel in a python question? All I I wanted to know was the absolute location of the python script that fails to import for you, and the contents of your sys.path in Maya to see where it is checking 

This is like pulling teeth. 


On Friday, April 1, 2016 at 10:01:41 PM UTC-4, Justin Israel wrote:


On Sat, 2 Apr 2016 12:56 PM Crest Christopher <crestchr...@gmail.com> wrote:
That wasn't the case when the Python Module path was in my system environment variable; I didn't need to have all my Python Maya scripts in the Python Modules path location ?

Here is the absolute path for all my python scripts, same absolute path as listed in the Maya.env file for PYTHONPATH.

C:\Custom Program Settings\Maya_Resources\pythonscript

You can either set your PYTHONPATH from the Maya.env or the userSetup.mel 
If you add your custom scripts location to the sys.path in your userSetup.mel, does it then succeed in importing your script? 

If not, go into the script editor and run:

print '\n'.join(sys.path)

And show us the results of that 

Friday, April 01, 2016 7:49 PM

Yes it would work as long as your scripts are in that site packages location. What is the absolute path to your script?


--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
I don't know what else to explain. Have I missed a piece of information you want ?


Friday, April 01, 2016 4:26 PM

Let's just cut to the chase and you tell me where your scripts *are* located?
Obviously your standard environment has those locations in the PYTHONPATH and Maya's env does not.

It isn't a complicated concept. If you add the locationa of your scripts and dependencies to the sys.path in Maya, then you should be able to import your scripts


--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
Friday, April 01, 2016 4:20 PM
No.

When I had a system environment variable set for Python modules, I didn't have all the Python scripts in the Python modules path and the scripts worked perfectly.

Justin Israel wrote:
Friday, April 01, 2016 3:06 PM
Are you python scripts inside that location?

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/7645a17f-bd59-4cb7-838f-4d2424dd1e9d%40googlegroups.com.

Christopher.

unread,
Apr 2, 2016, 6:56:05 PM4/2/16
to Python Programming for Autodesk Maya


On Saturday, April 2, 2016 at 5:05:08 PM UTC-4, Justin Israel wrote:


On Sun, Apr 3, 2016 at 12:28 AM Christopher. <crestchr...@gmail.com> wrote:


On Saturday, April 2, 2016 at 12:04:27 AM UTC-4, Justin Israel wrote: 

I was hoping to just see the results so you could then answer if any of those paths actually contain the python script you areare failing to import 

The results of the command show none of the paths which contain strictly my Python Scripts.

Something is not adding up here.
When I do the following test:

*scripts/userSetup.mel*

python("import sys; sys.path.append('FOO/BAR')")

Then I launch maya and do:   print '\n'.join(sys.path)

I see all of the other Maya paths, and the last line is "FOO/BAR".
If you are not seeing your path at the end of a bunch of other lines, something is strange. Did you check the top of your script editor for errors when Maya was first launched?

There are no errors at the top of the script editor when Maya launches.  

When running this command; print '\n'.join(sys.path), the last line is not my Custom Python Scripts path.

In my system environment variable I have; MAYA_APP_DIR which points to a custom path overriding the default Maya default installation path which usually resides in MyDocuments > Maya > 201X-64. Therefore in the new MAYA_APP_DIR path, I have a Maya.env and in that Maya.env file I have the PYTHONPATH="" you most likely know this by now but I recapped for clarification.

In my userSetup.mel file, which rests in the custom path as stated in the MAYA_APP_DIR system environment variable specifically within; customPath\customPath2\Preferences\2015-x64\scripts

When restarting Maya and trying to run any Python script, they don't run, so my guess is, the Python scripts can't find the Python Modules.

 
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.
I don't know what else to explain. Have I missed a piece of information you want ?


Friday, April 01, 2016 4:26 PM

Let's just cut to the chase and you tell me where your scripts *are* located?
Obviously your standard environment has those locations in the PYTHONPATH and Maya's env does not.

It isn't a complicated concept. If you add the locationa of your scripts and dependencies to the sys.path in Maya, then you should be able to import your scripts


--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.
Friday, April 01, 2016 4:20 PM
No.

When I had a system environment variable set for Python modules, I didn't have all the Python scripts in the Python modules path and the scripts worked perfectly.

Justin Israel wrote:
Friday, April 01, 2016 3:06 PM
Are you python scripts inside that location?

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

Justin Israel

unread,
Apr 2, 2016, 7:24:20 PM4/2/16
to python_in...@googlegroups.com
On Sun, Apr 3, 2016 at 10:56 AM Christopher. <crestchr...@gmail.com> wrote:


On Saturday, April 2, 2016 at 5:05:08 PM UTC-4, Justin Israel wrote:


On Sun, Apr 3, 2016 at 12:28 AM Christopher. <crestchr...@gmail.com> wrote:


On Saturday, April 2, 2016 at 12:04:27 AM UTC-4, Justin Israel wrote: 

I was hoping to just see the results so you could then answer if any of those paths actually contain the python script you areare failing to import 

The results of the command show none of the paths which contain strictly my Python Scripts.

Something is not adding up here.
When I do the following test:

*scripts/userSetup.mel*

python("import sys; sys.path.append('FOO/BAR')")

Then I launch maya and do:   print '\n'.join(sys.path)

I see all of the other Maya paths, and the last line is "FOO/BAR".
If you are not seeing your path at the end of a bunch of other lines, something is strange. Did you check the top of your script editor for errors when Maya was first launched?

There are no errors at the top of the script editor when Maya launches.  

When running this command; print '\n'.join(sys.path), the last line is not my Custom Python Scripts path.

In my system environment variable I have; MAYA_APP_DIR which points to a custom path overriding the default Maya default installation path which usually resides in MyDocuments > Maya > 201X-64. Therefore in the new MAYA_APP_DIR path, I have a Maya.env and in that Maya.env file I have the PYTHONPATH="" you most likely know this by now but I recapped for clarification.

In my userSetup.mel file, which rests in the custom path as stated in the MAYA_APP_DIR system environment variable specifically within; customPath\customPath2\Preferences\2015-x64\scripts

You tend to not give accurately matching references to your pseudo-paths when you provide them for reference. What is the MAYA_APP_DIR path vs the path where you store your userSetup.py? Because if "Preferneces" isn't in that MAYA_APP_DIR path then I seems incorrect.

In any case, I replicated your setup. I created a location:

/tmp/maya_app

And set my shell env var:  MAYA_APP_DIR=/tmp/maya_app

I created /tmp/maya_app/Maya.env, with PYTHONPATH=""   (for whatever reason, even though it has no effect)

I created /tmp/maya_app/2015-x64/scripts/userSetup.mel , containing:

python("import sys; sys.path.append('/tmp/my_python_stuff')");

Then I created /tmp/my_python_stuff/stuff.py 

When launching maya, and printing the sys.path, I see /tmp/my_python_stuff, and I am able to import the stuff module.


Justin

 
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
I don't know what else to explain. Have I missed a piece of information you want ?


Friday, April 01, 2016 4:26 PM

Let's just cut to the chase and you tell me where your scripts *are* located?
Obviously your standard environment has those locations in the PYTHONPATH and Maya's env does not.

It isn't a complicated concept. If you add the locationa of your scripts and dependencies to the sys.path in Maya, then you should be able to import your scripts


--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
Friday, April 01, 2016 4:20 PM
No.

When I had a system environment variable set for Python modules, I didn't have all the Python scripts in the Python modules path and the scripts worked perfectly.

Justin Israel wrote:
Friday, April 01, 2016 3:06 PM
Are you python scripts inside that location?

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/0669beac-65d8-4feb-bb4b-e08cac95874e%40googlegroups.com.

Christopher.

unread,
Apr 2, 2016, 7:30:41 PM4/2/16
to Python Programming for Autodesk Maya
On Saturday, April 2, 2016 at 7:24:20 PM UTC-4, Justin Israel wrote:


On Sun, Apr 3, 2016 at 10:56 AM Christopher. <crestchr...@gmail.com> wrote:


On Saturday, April 2, 2016 at 5:05:08 PM UTC-4, Justin Israel wrote:


On Sun, Apr 3, 2016 at 12:28 AM Christopher. <crestchr...@gmail.com> wrote:


On Saturday, April 2, 2016 at 12:04:27 AM UTC-4, Justin Israel wrote: 

I was hoping to just see the results so you could then answer if any of those paths actually contain the python script you areare failing to import 

The results of the command show none of the paths which contain strictly my Python Scripts.

Something is not adding up here.
When I do the following test:

*scripts/userSetup.mel*

python("import sys; sys.path.append('FOO/BAR')")

Then I launch maya and do:   print '\n'.join(sys.path)

I see all of the other Maya paths, and the last line is "FOO/BAR".
If you are not seeing your path at the end of a bunch of other lines, something is strange. Did you check the top of your script editor for errors when Maya was first launched?

There are no errors at the top of the script editor when Maya launches.  

When running this command; print '\n'.join(sys.path), the last line is not my Custom Python Scripts path.

In my system environment variable I have; MAYA_APP_DIR which points to a custom path overriding the default Maya default installation path which usually resides in MyDocuments > Maya > 201X-64. Therefore in the new MAYA_APP_DIR path, I have a Maya.env and in that Maya.env file I have the PYTHONPATH="" you most likely know this by now but I recapped for clarification.

In my userSetup.mel file, which rests in the custom path as stated in the MAYA_APP_DIR system environment variable specifically within; customPath\customPath2\Preferences\2015-x64\scripts

You tend to not give accurately matching references to your pseudo-paths when you provide them for reference. What is the MAYA_APP_DIR path vs the path where you store your userSetup.py? Because if "Preferneces" isn't in that MAYA_APP_DIR path then I seems incorrect.

This is the path where I have stored userSetup.mel; C:\Custom Program Settings\Maya_Resources\Preferences\2015-x64\scripts

And this is the path in my userSetup.mel file; C:\Custom Program Settings\Maya_Resources\pythonscript

There is a difference because none of my python script exist in the first path as I have the path just above ^ in my Maya.env file for Python scripts which as you know that variable name is PYTHONPATH=

 
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.
I don't know what else to explain. Have I missed a piece of information you want ?


Friday, April 01, 2016 4:26 PM

Let's just cut to the chase and you tell me where your scripts *are* located?
Obviously your standard environment has those locations in the PYTHONPATH and Maya's env does not.

It isn't a complicated concept. If you add the locationa of your scripts and dependencies to the sys.path in Maya, then you should be able to import your scripts


--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.
Friday, April 01, 2016 4:20 PM
No.

When I had a system environment variable set for Python modules, I didn't have all the Python scripts in the Python modules path and the scripts worked perfectly.

Justin Israel wrote:
Friday, April 01, 2016 3:06 PM
Are you python scripts inside that location?

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

Crest Christopher

unread,
Apr 4, 2016, 11:58:14 AM4/4/16
to python_in...@googlegroups.com
Any other suggestions on this problem ?

Saturday, April 02, 2016 7:30 PM
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/e4944fe7-5a0f-4bb0-ae3c-64b4a8118f9a%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Saturday, April 02, 2016 7:24 PM


On Sun, Apr 3, 2016 at 10:56 AM Christopher. <crestchr...@gmail.com> wrote:


On Saturday, April 2, 2016 at 5:05:08 PM UTC-4, Justin Israel wrote:


On Sun, Apr 3, 2016 at 12:28 AM Christopher. <crestchr...@gmail.com> wrote:


On Saturday, April 2, 2016 at 12:04:27 AM UTC-4, Justin Israel wrote: 

I was hoping to just see the results so you could then answer if any of those paths actually contain the python script you areare failing to import 

The results of the command show none of the paths which contain strictly my Python Scripts.

Something is not adding up here.
When I do the following test:

*scripts/userSetup.mel*

python("import sys; sys.path.append('FOO/BAR')")

Then I launch maya and do:   print '\n'.join(sys.path)

I see all of the other Maya paths, and the last line is "FOO/BAR".
If you are not seeing your path at the end of a bunch of other lines, something is strange. Did you check the top of your script editor for errors when Maya was first launched?

There are no errors at the top of the script editor when Maya launches.  

When running this command; print '\n'.join(sys.path), the last line is not my Custom Python Scripts path.

In my system environment variable I have; MAYA_APP_DIR which points to a custom path overriding the default Maya default installation path which usually resides in MyDocuments > Maya > 201X-64. Therefore in the new MAYA_APP_DIR path, I have a Maya.env and in that Maya.env file I have the PYTHONPATH="" you most likely know this by now but I recapped for clarification.

In my userSetup.mel file, which rests in the custom path as stated in the MAYA_APP_DIR system environment variable specifically within; customPath\customPath2\Preferences\2015-x64\scripts

You tend to not give accurately matching references to your pseudo-paths when you provide them for reference. What is the MAYA_APP_DIR path vs the path where you store your userSetup.py? Because if "Preferneces" isn't in that MAYA_APP_DIR path then I seems incorrect.

To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
I don't know what else to explain. Have I missed a piece of information you want ?


Friday, April 01, 2016 4:26 PM

Let's just cut to the chase and you tell me where your scripts *are* located?
Obviously your standard environment has those locations in the PYTHONPATH and Maya's env does not.

It isn't a complicated concept. If you add the locationa of your scripts and dependencies to the sys.path in Maya, then you should be able to import your scripts


--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
Friday, April 01, 2016 4:20 PM
No.

When I had a system environment variable set for Python modules, I didn't have all the Python scripts in the Python modules path and the scripts worked perfectly.

Justin Israel wrote:
Friday, April 01, 2016 3:06 PM
Are you python scripts inside that location?

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA31UDf%3Dk9iHzfNZazR4kYsyBVzBbYFWtncf424gYrq53A%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.
Saturday, April 02, 2016 6:56 PM


On Saturday, April 2, 2016 at 5:05:08 PM UTC-4, Justin Israel wrote:


On Sun, Apr 3, 2016 at 12:28 AM Christopher. <crestchr...@gmail.com> wrote:


On Saturday, April 2, 2016 at 12:04:27 AM UTC-4, Justin Israel wrote: 

I was hoping to just see the results so you could then answer if any of those paths actually contain the python script you areare failing to import 

The results of the command show none of the paths which contain strictly my Python Scripts.

Something is not adding up here.
When I do the following test:

*scripts/userSetup.mel*

python("import sys; sys.path.append('FOO/BAR')")

Then I launch maya and do:   print '\n'.join(sys.path)

I see all of the other Maya paths, and the last line is "FOO/BAR".
If you are not seeing your path at the end of a bunch of other lines, something is strange. Did you check the top of your script editor for errors when Maya was first launched?

There are no errors at the top of the script editor when Maya launches.  

When running this command; print '\n'.join(sys.path), the last line is not my Custom Python Scripts path.

In my system environment variable I have; MAYA_APP_DIR which points to a custom path overriding the default Maya default installation path which usually resides in MyDocuments > Maya > 201X-64. Therefore in the new MAYA_APP_DIR path, I have a Maya.env and in that Maya.env file I have the PYTHONPATH="" you most likely know this by now but I recapped for clarification.

In my userSetup.mel file, which rests in the custom path as stated in the MAYA_APP_DIR system environment variable specifically within; customPath\customPath2\Preferences\2015-x64\scripts

To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
Saturday, April 02, 2016 5:04 PM


On Sun, Apr 3, 2016 at 12:28 AM Christopher. <crestchr...@gmail.com> wrote:


On Saturday, April 2, 2016 at 12:04:27 AM UTC-4, Justin Israel wrote: 

I was hoping to just see the results so you could then answer if any of those paths actually contain the python script you areare failing to import 

The results of the command show none of the paths which contain strictly my Python Scripts.

Something is not adding up here.
When I do the following test:

*scripts/userSetup.mel*

python("import sys; sys.path.append('FOO/BAR')")

Then I launch maya and do:   print '\n'.join(sys.path)

I see all of the other Maya paths, and the last line is "FOO/BAR".
If you are not seeing your path at the end of a bunch of other lines, something is strange. Did you check the top of your script editor for errors when Maya was first launched?

To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
I don't know what else to explain. Have I missed a piece of information you want ?


Friday, April 01, 2016 4:26 PM

Let's just cut to the chase and you tell me where your scripts *are* located?
Obviously your standard environment has those locations in the PYTHONPATH and Maya's env does not.

It isn't a complicated concept. If you add the locationa of your scripts and dependencies to the sys.path in Maya, then you should be able to import your scripts


--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
Friday, April 01, 2016 4:20 PM
No.

When I had a system environment variable set for Python modules, I didn't have all the Python scripts in the Python modules path and the scripts worked perfectly.

Justin Israel wrote:
Friday, April 01, 2016 3:06 PM
Are you python scripts inside that location?

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2nyVZ_DSd-QDMgLJHjxngowtSHvB6H9p9pw5BuLu9Mkg%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.
Saturday, April 02, 2016 7:28 AM


On Saturday, April 2, 2016 at 12:04:27 AM UTC-4, Justin Israel wrote:


On Sat, 2 Apr 2016 4:52 PM Christopher. <crestchr...@gmail.com> wrote:


On Friday, April 1, 2016 at 11:37:06 PM UTC-4, Justin Israel wrote:


On Sat, 2 Apr 2016 3:50 PM Christopher. <crestchr...@gmail.com> wrote:
There was extras related to other plug-ins I removed them and kept it to the relevant information to which the command spit out; hopefully this helps. 

C:/Custom Program Settings/Maya_Resources/Preferences/2015-x64/scripts/

You are saying that this path is the only thing in your sys.path? that can't be true. 

The command you told me to enter in the script editor gave me numerous paths, mostly related to Maya plugins etc.  

I was hoping to just see the results so you could then answer if any of those paths actually contain the python script you areare failing to import 

The results of the command show none of the paths which contain strictly my Python Scripts.
 
Sorry, what do you mean by sys.path, the only path in the userSetup.mel file or my system environment variable ? 

the result of printing that sys.path list and the thing you are appending to in your userSetup.mel

I mentioned the MEL script path, just for some understanding on the file structure I have setup, to help understand.  

As I mentioned, no one I've brought this issue to attention was able to solve, and I'v explained the situation as deep of an explanation as possible.  If you can solve, it would be a miracle; or anyone else for that matter. I must be trying to cure black magic or so it feels like.
the thing is. .. this is normally a pretty straight forward problem to solve. You append your custom locations to sys.path and away you go. the problem may be in the ability to communicate your problem and the ability to apply the suggestions you receive 

If you knew the suggestions and how I explained the situation, to many you'd realize the frustration.  It's similar to explaining a problem to twenty different people which as I said I have, with such detail.  Anyway, the only paths to which the command is spitting out is the custom default maya scripts path, which is created from the MAYA_APP_DIR system environment variable, as I know and was also informed by others.
 
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.

Marcus Ottosson

unread,
Apr 4, 2016, 1:07:54 PM4/4/16
to python_in...@googlegroups.com

Any other suggestions on this problem ?

It sounds like you’ve gotten plenty of suggestions already. The ball is in your court.


--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/7645a17f-bd59-4cb7-838f-4d2424dd1e9d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Marcus Ottosson
konstr...@gmail.com

Christopher.

unread,
Apr 4, 2016, 7:15:14 PM4/4/16
to Python Programming for Autodesk Maya
It sounds as if there is absolutely no way for the Python modules to be loaded by a userSetup.mel or userSetup.py file and have python scripts which rest in a custom folder/directory on a system which are read by the Maya.env file as PYTHONPATH="". That is what I'm beginning to extract from all the suggestions !

As my original question stated, it worked when it was a system environment variable, I forgot the system environment variable for which I used to load python modules.  

And so when it was working, I could throw a python script in my PYTHONPATH as stated in my Maya.env file restart and presto it would work. 

On Monday, March 28, 2016 at 10:00:37 PM UTC-4, Christopher. wrote:
I have Python 2.6 (26) & Python 2.7 (27) installed, what is the path used for the modules to append to a system environment variable; C:\Python27\modules\modules ? 

Justin Israel

unread,
Apr 4, 2016, 7:38:15 PM4/4/16
to python_in...@googlegroups.com
On Tue, Apr 5, 2016 at 11:15 AM Christopher. <crestchr...@gmail.com> wrote:
It sounds as if there is absolutely no way for the Python modules to be loaded by a userSetup.mel or userSetup.py file and have python scripts which rest in a custom folder/directory on a system which are read by the Maya.env file as PYTHONPATH="". That is what I'm beginning to extract from all the suggestions !

This is a false statement. The correct statement would be that you are personally not finding a way to make this work. As I had previously mentioned, I set up a similar reproduction of your configuration on my OSX laptop and was able to set custom paths, which were visible in sys.path within Maya. 

I am not sure why it is not working for you.

 

As my original question stated, it worked when it was a system environment variable, I forgot the system environment variable for which I used to load python modules.  

And so when it was working, I could throw a python script in my PYTHONPATH as stated in my Maya.env file restart and presto it would work. 


On Monday, March 28, 2016 at 10:00:37 PM UTC-4, Christopher. wrote:
I have Python 2.6 (26) & Python 2.7 (27) installed, what is the path used for the modules to append to a system environment variable; C:\Python27\modules\modules ? 

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

Crest Christopher

unread,
Apr 4, 2016, 7:43:53 PM4/4/16
to python_in...@googlegroups.com
Justin can you make a video of your Maya.env including the Maya.env, including PYTHONPATH as well your userSetup file and what is within the userSetup file ?

If it works for you, and it's not working for me and I'm doing exactly the same thing as you, the only way is to do a one to one match and see where there is a inconsistency.



Monday, April 04, 2016 7:37 PM
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA3L9ryuMyHRtzFJ4%2BVz_XiyC1MQ8YViboQa0QCWY6nz7g%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.
Monday, April 04, 2016 7:15 PM
It sounds as if there is absolutely no way for the Python modules to be loaded by a userSetup.mel or userSetup.py file and have python scripts which rest in a custom folder/directory on a system which are read by the Maya.env file as PYTHONPATH="". That is what I'm beginning to extract from all the suggestions !

As my original question stated, it worked when it was a system environment variable, I forgot the system environment variable for which I used to load python modules.  

And so when it was working, I could throw a python script in my PYTHONPATH as stated in my Maya.env file restart and presto it would work. 

On Monday, March 28, 2016 at 10:00:37 PM UTC-4, Christopher. wrote:
--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
Monday, March 28, 2016 10:00 PM
I have Python 2.6 (26) & Python 2.7 (27) installed, what is the path used for the modules to append to a system environment variable; C:\Python27\modules\modules ? 
--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CzEXgn-GIaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/9a38daef-9c8e-4d80-8db3-52411b381dd0%40googlegroups.com.

Kurian O.S

unread,
Apr 4, 2016, 7:46:58 PM4/4/16
to python_in...@googlegroups.com

On Mon, Apr 4, 2016 at 4:43 PM, Crest Christopher <crestchr...@gmail.com> wrote:
Justin can you make a video of your Maya.env including the Maya.env, including PYTHONPATH as well your userSetup file and what is within the userSetup file ?

Are you serious ?


--
--:: Kurian ::--

Justin Israel

unread,
Apr 4, 2016, 7:50:01 PM4/4/16
to python_in...@googlegroups.com
On Tue, Apr 5, 2016 at 11:43 AM Crest Christopher <crestchr...@gmail.com> wrote:
Justin can you make a video of your Maya.env including the Maya.env, including PYTHONPATH as well your userSetup file and what is within the userSetup file ?

I'm not recording a video to show you the contents of two files. If you read the history of this thread you will see my reply where I explained the contents of the two files in actual text.

I will even save you the trouble of scrolling through the history and repaste in simpler text than before:

*2015-x64/Maya.env*
PYTHONPATH=""

*2015-x64/scripts/userSetup.mel*
python("import sys; sys.path.append('/tmp/my_python_stuff')");

Crest Christopher

unread,
Apr 4, 2016, 7:53:41 PM4/4/16
to python_in...@googlegroups.com
my_python_stuff folder as you have in your system; is stated in PYTHONPATH in your Maya.env file, correct ?

And within the folder on your system 'my_python_path' you have a few python scripts to which when running the correct command for those scripts in Maya, those scripts execute ?



Monday, April 04, 2016 7:49 PM

Justin Israel

unread,
Apr 4, 2016, 7:55:59 PM4/4/16
to python_in...@googlegroups.com
On Tue, Apr 5, 2016 at 11:53 AM Crest Christopher <crestchr...@gmail.com> wrote:
my_python_stuff folder as you have in your system; is stated in PYTHONPATH in your Maya.env file, correct ?


Did my paste of the contents of Maya.env show that I had that path set? No. If you read it, the only contents of Maya.env are matching what you said you do, which is to set PYTHONPATH=""   (empty string) for whatever reason.

The only place where my custom path is really added is in the userSetup.mel
 
And within the folder on your system 'my_python_path' you have a few python scripts to which when running the correct command for those scripts in Maya, those scripts execute ?

Within my /tmp/my_python_path I have various scripts. One of those scripts is called "stuff.py"
From within Maya's Script Editor, I am able to do:

import stuff
stuff.do()
 

Crest Christopher

unread,
Apr 4, 2016, 8:00:49 PM4/4/16
to python_in...@googlegroups.com


Monday, April 04, 2016 7:55 PM


On Tue, Apr 5, 2016 at 11:53 AM Crest Christopher <crestchr...@gmail.com> wrote:
my_python_stuff folder as you have in your system; is stated in PYTHONPATH in your Maya.env file, correct ?


Did my paste of the contents of Maya.env show that I had that path set? No. If you read it, the only contents of Maya.env are matching what you said you do, which is to set PYTHONPATH=""   (empty string) for whatever reason.
If I didn't mention to put a path in the PYTHONPATH in your Maya.env file that was my fault, but I did mean opposite of what you had done, in other words, put a path for the variable PYTHONPATH in your Maya.env file.

That is where you test and what I have setup differentiate.
The only place where my custom path is really added is in the userSetup.mel
Correct me if I'm wrong, the userSetup file regardless Python or MEL extension contains the path for the Python Modules for which Python scripts can locate the modules, is that not how that should function ?

Justin Israel

unread,
Apr 4, 2016, 8:07:05 PM4/4/16
to python_in...@googlegroups.com
On Tue, Apr 5, 2016 at 12:00 PM Crest Christopher <crestchr...@gmail.com> wrote:


Monday, April 04, 2016 7:55 PM


On Tue, Apr 5, 2016 at 11:53 AM Crest Christopher <crestchr...@gmail.com> wrote:
my_python_stuff folder as you have in your system; is stated in PYTHONPATH in your Maya.env file, correct ?


Did my paste of the contents of Maya.env show that I had that path set? No. If you read it, the only contents of Maya.env are matching what you said you do, which is to set PYTHONPATH=""   (empty string) for whatever reason.
If I didn't mention to put a path in the PYTHONPATH in your Maya.env file that was my fault, but I did mean opposite of what you had done, in other words, put a path for the variable PYTHONPATH in your Maya.env file.

That is where you test and what I have setup differentiate.

You have been stating an entry in your Maya.env as being  PYTHONPATH="" this entire time. So yes this is your fault for poorly presenting the details of your problem and requiring that there be a back and forth of us asking for more info, or for all the info in one place. I think I am done with this thread and wasting my time trying to help you solve this. It simply goes round and round in circles with missing information and miscommunication.
 
The only place where my custom path is really added is in the userSetup.mel
Correct me if I'm wrong, the userSetup file regardless Python or MEL extension contains the path for the Python Modules for which Python scripts can locate the modules, is that not how that should function ?

userSetup.[mel,py] contains any logic you want to run when Maya starts. Setting paths is one thing you can do.
 

Crest Christopher

unread,
Apr 4, 2016, 8:30:45 PM4/4/16
to python_in...@googlegroups.com


Monday, April 04, 2016 8:06 PM


On Tue, Apr 5, 2016 at 12:00 PM Crest Christopher <crestchr...@gmail.com> wrote:


Monday, April 04, 2016 7:55 PM


On Tue, Apr 5, 2016 at 11:53 AM Crest Christopher <crestchr...@gmail.com> wrote:
my_python_stuff folder as you have in your system; is stated in PYTHONPATH in your Maya.env file, correct ?


Did my paste of the contents of Maya.env show that I had that path set? No. If you read it, the only contents of Maya.env are matching what you said you do, which is to set PYTHONPATH=""   (empty string) for whatever reason.
If I didn't mention to put a path in the PYTHONPATH in your Maya.env file that was my fault, but I did mean opposite of what you had done, in other words, put a path for the variable PYTHONPATH in your Maya.env file.

That is where you test and what I have setup differentiate.

You have been stating an entry in your Maya.env as being  PYTHONPATH="" this entire time. So yes this is your fault for poorly presenting the details of your problem and requiring that there be a back and forth of us asking for more info, or for all the info in one place. I think I am done with this thread and wasting my time trying to help you solve this. It simply goes round and round in circles with missing information and miscommunication.
One would assume why would one leave PYTHONPATH="" empty. 

It didn't really go around and round in circles now that this piece of this information is understood; problems can appear to go around and around but they never continue to go around and around !

Miscommunication, yes for sure, but by both avenues.  Since you have made up your mind in helping, over a single piece of information, what more can I say, right !




For more options, visit https://groups.google.com/d/optout.
Monday, April 04, 2016 8:00 PM


Monday, April 04, 2016 7:55 PM


On Tue, Apr 5, 2016 at 11:53 AM Crest Christopher <crestchr...@gmail.com> wrote:
my_python_stuff folder as you have in your system; is stated in PYTHONPATH in your Maya.env file, correct ?


Did my paste of the contents of Maya.env show that I had that path set? No. If you read it, the only contents of Maya.env are matching what you said you do, which is to set PYTHONPATH=""   (empty string) for whatever reason.
If I didn't mention to put a path in the PYTHONPATH in your Maya.env file that was my fault, but I did mean opposite of what you had done, in other words, put a path for the variable PYTHONPATH in your Maya.env file.

That is where you test and what I have setup differentiate.
The only place where my custom path is really added is in the userSetup.mel
Correct me if I'm wrong, the userSetup file regardless Python or MEL extension contains the path for the Python Modules for which Python scripts can locate the modules, is that not how that should function ?

 
And within the folder on your system 'my_python_path' you have a few python scripts to which when running the correct command for those scripts in Maya, those scripts execute ?
Monday, April 04, 2016 7:55 PM
On Tue, Apr 5, 2016 at 11:53 AM Crest Christopher <crestchr...@gmail.com> wrote:
my_python_stuff folder as you have in your system; is stated in PYTHONPATH in your Maya.env file, correct ?


Did my paste of the contents of Maya.env show that I had that path set? No. If you read it, the only contents of Maya.env are matching what you said you do, which is to set PYTHONPATH=""   (empty string) for whatever reason.

The only place where my custom path is really added is in the userSetup.mel
 
And within the folder on your system 'my_python_path' you have a few python scripts to which when running the correct command for those scripts in Maya, those scripts execute ?
Monday, April 04, 2016 7:53 PM
my_python_stuff folder as you have in your system; is stated in PYTHONPATH in your Maya.env file, correct ?

And within the folder on your system 'my_python_path' you have a few python scripts to which when running the correct command for those scripts in Maya, those scripts execute ?




Reply all
Reply to author
Forward
0 new messages