Change Python environment back to default

153
5
05-19-2020 10:22 AM
Occasional Contributor

I did some training for the Spatial Data Science MOOC and in it they had us do some work with the deep learning modules. Anyhow, now my default python environment for Python is set to this cloned environment and I don't understand how to set it back to the default? I need the default since I am using it with Visual Studio for another application and I need to update modules including the arcgis module. I am guessing that is the problem.

When I try to make the updates in VS I get the following errors:

----- Installing 'arcgis' -----
Traceback (most recent call last):
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\pip\__main__.py", line 16, in <module>
from pip._internal import main as _main # isort:skip # noqa
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\pip\_internal\__init__.py", line 40, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\pip\_internal\cli\autocompletion.py", line 8, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\pip\_internal\cli\main_parser.py", line 11, in <module>
from pip._internal.commands import (
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\pip\_internal\commands\__init__.py", line 6, in <module>
from pip._internal.commands.completion import CompletionCommand
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\pip\_internal\commands\completion.py", line 6, in <module>
from pip._internal.cli.base_command import Command
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\pip\_internal\cli\base_command.py", line 26, in <module>
from pip._internal.index import PackageFinder
ImportError: cannot import name 'PackageFinder'
----- Failed to install 'arcgis' -----

Reply
0 Kudos
5 Replies
MVP Esteemed Contributor

In Pro, go to the Python Properties, Mange Environments and change it back to the default:

can't wait to retire....
Occasional Contributor

OK that worked to reset ArcGIS Pro, but my Visual Studio Python packages still won't update and I get the same error. So it must be something else. Thanks for the help.

Reply
0 Kudos
MVP Esteemed Contributor

oh sorry... VS: can't help you there...

can't wait to retire....
Reply
0 Kudos
Occasional Contributor

OK so after resetting my ArcGIS Pro back to the default Python and rebooting my machine, my Visual Studios is able to update the Python packages. 

Reply
0 Kudos
MVP Esteemed Contributor

Oh cool: yesterday I couldn't even spell VS...

can't wait to retire....
Reply
0 Kudos