First time here? Check out the FAQ!
1

What is the best way to set up Wing to work with ESRI Tools created with Python 2.7 or Python 3.x?

I want to be able to switch from one version of Python to another so that I can support both older scripts that were created to work with ArcGIS Desktop (Python 2.7) and to begin creating\supporting scripts written for ArcGIS Pro (Python 3.x).

I've seen documentation for "Projects", "Launch Configuration" and "Activated Environment". I am using Personal 10.0.8.0.

LayneSeely's avatar
11
LayneSeely
asked 2025-01-29 11:09:13 -0600
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

2 Answers

0

You can set Python Executable in Project Properties, from the Project menu, to tell Wing which Python installation or environment to use. In general we recommend using one per project and use Projects > Recent to switch quickly as needed. With Launch Configurations you can use multiple envs in one project in various ways, like setting up different Python envs for different unit test files, but code analysis, error checking, etc, all only use the main env.

I don't have any info specific to ArcGIS but I know Wing is often used with that and from what I'm finding online I think it's just a question of setting up the Python env. Please let us know if you have other questions or this doesn't help.

Wingware Admin's avatar
266
Wingware Admin
answered 2025-01-30 07:18:33 -0600
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
0

Thank you for the response. I have set up projects for Python Desktop & Python Pro - with each pointing to the appropriate executable. However, now I am getting the following error from a script called "os.py" when I open Wing:

File "C:\Program Files\Wing Personal 10\bin\x-wingide-python-shell:\2083789798880\1", line 29, in File "C:\Program Files\Wing Personal 10\bin\x-wingide-python-shell:\2083789798880\1", line 12, in File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib_collections_abc.py", line 774, in get return self[key] File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\os.py", line 676, in __getitem__ value = self._data[self.encodekey(key)] builtins.KeyError: 'PYTHONSTARTUP'

LayneSeely's avatar
11
LayneSeely
answered 2025-01-30 11:18:26 -0600
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer