Change Python environment back to default

1787
5
05-19-2020 10:22 AM
JoeWeyl
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' -----

0 Kudos
5 Replies
JoeBorgione
MVP Emeritus

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

That should just about do it....
JoeWeyl
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.

0 Kudos
JoeBorgione
MVP Emeritus

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

That should just about do it....
0 Kudos
JoeWeyl
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. 

0 Kudos
JoeBorgione
MVP Emeritus

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

That should just about do it....
0 Kudos