there're some functions seems only be available in the Arcpy come with ArcGIS Pro (arcgispro-py3), for example AddFields_management. we have arcgis server 10.6.1, and I'm wondering whether it is possible to publish python script has this kind of functions as a geoprocessing service. My understanding is 10.6.1 use Python 2.7 and its arcpy model doesn't have the functions you can find in Pro. Doesn't mean it is not possible, or i have to manually import the module to the server and config the path etc.?
You can use Python to publish a geoprocessing service to a stand-alone server from ArcGIS Pro 2.3 and later. Please see the following documentation: Publish web tools in a Python script—ArcGIS Pro | Documentation
If you have server federated with an ArcGIS Enterprise Portal, you can share this web tool directly from the geoprocessing job history in ArcGIS Pro.
hi Lynsey, thanks for the suggestion. I have no problem to publish a geoprocessing service to our server. However, my challenge is, some of the arpcy functions that only available under the Python 3.x version, (e.g. AddFields_magagments, which allows adding multiple fields to a feature class at one time) is not available on the ArcGIS Server (10.6.1) that we have. I still can't see how will publish a gp service using Python script can fix that.