How to use pymel in any external maya ide (maya 2023)

hi all, this is my first post. I am writing in desperation. :sob:

I’ve been trying all day without success to configure VisualStudio code or pycharm to handle maya.cmds and pymel.core.

I followed all instructions to the letter, but apparently Maya 2023 refuses to be tamed.

MayaCode for Visualstudio doesn’t seem to work, as does MayaCharm for Pycharm.

I just need the autocomplete function.

Do you have any advice? I would need some help or step by step guide. Thanks in advance!

i forgot where you download it from now since i no longer use maya, but you just have to add the path to the pymel completion files from the devkit in your ide to the paths used by the interpreters.

normally people would add mayapy to the ide as a interpreter, then add those additional paths for completion.

devkit should be on this page

once you extract it there should be a completions folder that has cmds, pymel and open api completion files

thanks for the answer.
Unfortunately in
Maya 22 Devkit there is no completition stubs.
as it was for the 19:

I don’t really know what to do… (apart from crying)…

Chad Dombrova

Posted on 6 апр. • Updated on 7 апр.
PyMEL’s new type stubs

My solution for now was to download completion library from 2020 and add it to the mayapy interpreter into the settings. Probably I’ll experience some issue related to mismatching version, but so far so good.

Contains, but only for Python 2.7 …
For examples:\devkitBase\devkit\other\Python27\pymel\extras\completion\devkitBase\devkit\other\Python27\pymel\extras\completion\devkitBase\devkit\other\Python27\pymel\extras\completion\devkitBase\devkit\other\Python27\pymel\extras\completion\devkitBase\devkit\other\Python27\pymel\extras\completion

Why are you not using the new version of PyMEL 1.3.0 ?

Chad Dombrova aka chadrik:

On to the release PyMEL 1.3.0.
There are two big improvements in 1.3.0:

  1. support for Maya 2023 and fixes for 2022 in python3 mode
  2. very accurate stubs for code completion and static analysis, distributed as PEP 561-compliant pyi files.

The second feature means if you use an editor that understands pyi stubs, like PyCharm and VS Code with Pylance, you should begin to see immediate improvements just by pip installing pymel into a virtual env that your editor knows about.

1 Like

hey thanks! I got confused, I meant that the “other” folder is not present in version 23, not in 22, so I got the asset for 23 in the 22. Thanks again for the heads up.
These things are new to me, I just started with programming for maya.