I am trying to import arcpy into a script in PyCharm 2021.1. I do not have access to ArcGIS Pro, so I used the advice on this page to clone python 3.7 in Anaconda. I am trying to change the PyCharm python location setting to this clone, but getting this error message in the Virtual Environment setting, ""Environment location directory is not empty." enter image description here I switched to Conda Environment and it allowed the location, and I hit OK to apply it, but then got this error message, "...can't create; no such file or directory." enter image description here

How can I get PyCharm to work with ArcPy without ArcGIS Pro?


2 Answers 2


arcpy requires ArcGIS Pro and cannot be used without a full ArcGIS Pro install.

However, you can install and use the the ArcGIS API for Python as per the documentation you linked to, but note that this is not arcpy. The API will have some additional functionality if arcpy is installed, but it is not required.

You're trying to create a virtualenv, but you have already created (by cloning) a conda env. A virtualenv is very different to a conda env. So:

  1. select the "Conda Environment", not the "Virtualenv Environment" radio button and
  2. Once you've selected "Conda Environment", select "Existing environment" not "New environment" as you've already created the environment outside of PyCharm.
  3. Finally, you can install the ArcGIS API for Python.

Delete venv folder and try to add the interpreter again. It will solve the error.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.