I'm starting to develop som geoprocessing tools in ArcGIS Pro using some third party python modules, but even with the simpliest of tools it fails to run from Portal
"""Define the toolbox (the name of the toolbox is the name of the
self.label = "Toolbox"
self.alias = ""
# List of tool classes associated with this toolbox
self.tools = [Tool]
"""Define the tool (tool name is the name of the class)."""
self.label = "Tool"
self.description = ""
self.canRunInBackground = False
"""Define parameter definitions"""
param0 = arcpy.Parameter(
param0.filter.type = "ValueList"
param0.filter.list = ['test1','test2']
param1 = arcpy.Parameter(
name = "LabelTest",
params = [param0, param1]
"""Set whether tool is licensed to execute."""
def updateParameters(self, parameters):
"""Modify the values and properties of parameters before internal
validation is performed. This method is called whenever a parameter
has been changed."""
parameters.value = parameters.value
def updateMessages(self, parameters):
"""Modify the messages created by internal validation for each tool
parameter. This method is called after internal validation."""
def execute(self, parameters, messages😞
"""The source code of the tool."""
returnVal = parameters.value + ' TEST ' + parameters.value
If I run this from Pro theres no problem and I can publish it as a webtool, no problem
But when I want to run it from portal i fails, unless I publis it without the import openpyxl line
So how do I get portal to use third party python modules like openpyxl ?
I know that, but how do I install those modules on the server, and witch server ?
My configuration is
Now that I'm developing in Python 3.x I would like for the server to run Python 3.x so I don't have any trouble with unicode characters ect.
re: getting installed on the Server....have you tried installing Pro on the server? I would think that would get Python 3 the environment setup with the correct paths, etc., but Dan is much more knowledgeable about that than I am, so I'll defer to him/others.