The snippet of code below has been running well for a while but I noticed that when I updated to Pro 3.2.1 it is no longer working. I can't tell at what version it stopped working because I have not run it in a while but it was definitely working at Pro 3.0.
I ran the code below in notebooks to test and confirmed that the Geoaccessor module is indeed missing. How do I add this module back and is there a reason as to why it's missing in Pro 3.2?
for x in arcgis.features.__dict__.keys():
print(x)
The above code returned
__name__
__doc__
__package__
__loader__
__spec__
__path__
__file__
__cached__
__builtins__
geo
feature
Feature
FeatureSet
FeatureCollection
_async
managers
layer
FeatureLayer
Table
FeatureLayerCollection
_parcel
ParcelFabricManager
_trace_configuration
_utility
UtilityNetworkManager
_version
_validation
ValidationManager
TraceConfiguration
analyze_patterns
enrich_data
find_locations
manage_data
summarize_data
use_proximity
analysis
elevation
hydrology
__all__
How do I add this module back and is there a reason as to why it's missing in Pro 3.2?
@Clubdebambos @PeterKnoop @EarlMedina @ChristopherCounsell @DanPatterson
Solved! Go to Solution.
Thanks for the link. I was able to fix the issue with a clean install of Pro 3.2.1. With the reinstall, all the modules were present and everything was working as expected...🤔.
I have zero experience in this domain but I found something related that may be worth exploring. The Spatially enabled DataFrame Developers page mentions some coding like this:
from arcgis.features import GeoAccessor, GeoSeriesAccessor
And a related link here.
Thanks for the suggestion. The line from arcgis.features import GeoAccessor, GeoSeriesAccessor returns the same error. After exploring the link that you posted, I took a look at my default environment and noticed that the arcgis package is not even listed. Even weirder is the fact that the arcpy package is not listed either. Yet I am able to run arcpy scripts and import the arcgis package in notebooks just fine.
Use the Add Packages in your cloned environment to add the arcgis package?
@Clubdebambos Cloning is not working for me currently for some reason. Nevertheless, I am curious as to why the arcgis and arcpy packages are not in the default environment in Pro 3.2 yet my Pro 2.9 machine has them without any need for cloning.
Strange alright, I recently removed all components of ArcGIS Pro 3.1 and did a fresh install of 3.2 and arcpy and arcgis were there. I did have the problem with cloning in 2.9. Instead of cloning and my 2.9 was missing arcgis package, I found the Python env folder for the install, you can get this in the Package Manager, then navigate to the envs folder, copy the arcgispro-py3 folder and paste, rename the copied folder however you like. Go back to the Package Manager and in the screenshot below click the folder with the plus to add the new environment and set as active.
@Clubdebambos I was able to clone with the workaround that you provided. Thanks. I set the clone as the active environment and clicked on Add Packages but the arcgis package is not included in the list of packages to add. Again, even with the cloned environment I am able to import the arcgis module into notebooks( even though it's not listed in the list of installed packages) but it's missing the geoaccessor module.
Yep, having the same issue. After upgrading to Pro 3.2.1, the arcgis package disappeared from the package manager in Pro.
The package does exist though if you run conda list in the Python Command Prompt (as shown below)
Looks like Pro isn't reading the packages from conda correctly.
Anyway, to solve the issue you're having, you can try following this article here which uses the Python command prompt to clone the Python environment.
Then, you can manually ask conda to install the package you require using the conda install <package_name> command.
Thanks for the link. I was able to fix the issue with a clean install of Pro 3.2.1. With the reinstall, all the modules were present and everything was working as expected...🤔.
Pro notebooks already use the correct environment.
If you didn't clone the arcgispro-py3 environment, you won't have the arcgis or arcpy package.
recreate the clone