Hello,
I have installed ArcGIS Server 10.6.1 on Linux and followed the instruction here to create a conda environment named arcgis with Python 3.6. Using the shell, I can activate the conda env and import arcpy successfully. However, the conda env does not work with any IDE (e.g., PyCharm, VS Code) or Jupyter Notebook. See below the message I got when trying to import arcpy in Jupyter Notebook. Any help will be greatly appreciated!
---------------------------------------------------------------------------
error Traceback (most recent call last)
<ipython-input-1-5467a3dc9fe3> in <module>()
----> 1 import arcpy
/opt/anaconda/envs/arcgis/lib/python3.6/site-packages/arcpy/__init__.py in <module>()
68 raise ImportError("arcpy needs to run within an active ArcGIS Conda environment")
69 else:--->
70 import _initagsenv
71
72 from arcpy.geoprocessing import gp
error: WSLib: failed initializing arcpy. Check if environment was activated correctly.
---------------------------------------------------------------------------
arcpy only works in Console