Maya does some things when it comes to how it deploys python that just
aren't compatible with virtualenv.
The biggest hurdle is that they zip up the entire standard library, while
virtualenv likes to copy and enhance certain files from the standard
library so as to operate properly.
On Wednesday, March 7, 2018 at 1:31:35 PM UTC-6, James Deschenes wrote:
> Has anyone had success with setting up virtual environments with mayapy?
> I'm seeing the following error and I'm guessing that the issue is with the
> python home and the binary being in different locations.
> C:\dev\hg_checkouts\mayaenv>virtualenv --python="C:\Program
> Files\Autodesk\Maya2018\bin\mayapy.exe" test
> Running virtualenv with interpreter C:\Program
> PYTHONHOME is set. You *must* activate the virtualenv before using it
> Traceback (most recent call last):
> File "c:\python27\lib\site-packages\virtualenv.py", line 2328, in
> File "c:\python27\lib\site-packages\virtualenv.py", line 713, in main
> File "c:\python27\lib\site-packages\virtualenv.py", line 925, in
> site_packages=site_packages, clear=clear, symlink=symlink))
> File "c:\python27\lib\site-packages\virtualenv.py", line 1145, in
> site_filename_dst = change_prefix(site_filename, home_dir)
> File "c:\python27\lib\site-packages\virtualenv.py", line 1036, in
> (filename, prefixes)
> AssertionError: Filename C:\Program
> Files\Autodesk\Maya2018\bin\python27.zip\site.py does not start with any of
> these prefixes: ['C:\\Program Files\\Autodesk\\Maya2018\\Python']
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 view this discussion on the web visit
For more options, visit https://groups.google.com/d/optout.