Python Forum
How to set up visual studio 2017 for 3ds max Python development
Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to set up visual studio 2017 for 3ds max Python development
#1
I'm trying to configure my visual studio (2017) development environment so it will allow me to debug Python scripts that are written for 3ds Max (2018).

Please note, 3ds Max using Python 2.7.12 for scripting.

The more specific or detailed problem I am having has to do with Qt and PySide2. If you look at a python example provided by 3ds, for me it is in this folder:

C:\Program Files\Autodesk\3ds Max 2018\scripts\Python

and the file is called:

demoPySideQWidget.py

at the top of the file, it imports QtCore and QtWidgets from PySide2. This demo runs fine and displays the dialog when running from the 3ds script editor.

From the Visual Studio side, I can't get the PySide2 packages to install. It looks like they aren't compatible with Python 2.7, when trying to add the package, it shows Install PySide2 (5.11.2) as an option, but selecting it yields the following:

----- Installing 'PySide2==5.11.2' -----
Collecting PySide2==5.11.2
Could not find a version that satisfies the requirement PySide2==5.11.2 (from versions: )
No matching distribution found for PySide2==5.11.2
----- Failed to install 'PySide2==5.11.2' -----


To summarize, the question is:

How to best configure the Visual Studio 2017 environment to work with the Python development constraints imposed by 3ds Max 2018?


Current configuration/setup within VS -

I've set up a custom python environment in VS, with the following configuration options:

Description: "3ds Max 2018 Python"

Prefix path: "C:\Program Files\Autodesk\3ds Max 2018"

Interpreter path: "C:\Program Files\Autodesk\3ds Max 2018\3dsmaxpy.exe"

I didn't set the following, but it defaulted.

Windowed interpreter: "C:\Program Files\Autodesk\3ds Max 2018\3dsmaxpy.exe"

Language version: "2.7"

Architecture: "64-bit"

Path environment variable: MAXPYTHONPATH

The MAXPYTHONPATH is a user defined environment variable that includes 3ds max folders (python and script sub-folders).
Reply
#2
I ended up bailing on this (Visual Studio) approach and went with PyCharm.

I added QtDesigner and Pyuic as external tool calls and so far, this seems to be a pretty good IDE.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python Coding in Power BI Visual vjrans 0 271 Jan-31-2024, 07:54 AM
Last Post: vjrans
  How to set PYTHONPATH in Visual Studio Code? aupres 5 4,125 Aug-15-2023, 03:51 PM
Last Post: snippsat
  how do I open two instances of visual studio code with the same folder? SuchUmami 3 878 Jun-26-2023, 09:40 AM
Last Post: snippsat
  Visual Studio Code NewPi 3 1,043 May-16-2023, 11:13 PM
Last Post: snippsat
  Python development environment standenman 3 1,608 May-04-2023, 07:24 PM
Last Post: snippsat
  Visual Studio Code venv ibm_db error mesi1000 7 2,784 Nov-13-2022, 12:36 AM
Last Post: snippsat
  debugging help on Visual Studio Code mg24 12 1,993 Oct-02-2022, 12:18 AM
Last Post: mg24
  Problem with importing Python file in Visual Studio Code DXav 7 5,068 Jun-15-2022, 12:54 PM
Last Post: snippsat
  Visual Studio Code Intellisense for Imported Modules Not Working hockinsk 1 2,709 Apr-23-2022, 04:41 PM
Last Post: deanhystad
Photo Visual studio code unable to color syntax on python interpreter tomtom 4 6,864 Mar-02-2022, 01:23 AM
Last Post: tomtom

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020