10/31/2023 0 Comments Professional pycharm![]() ![]() P圜harm has highlighted arcpy in line 2 (your first non-blank line). However, because your script's filename is arcpy.py, it thinks that it is the arcpy module you are seeking, and it is trying to import env from itself, hence the ImportError! Renaming your script so that it doesn't conflict with the name of a module you wish to import, such as should solve the problem. What is likely happening is that, upon calling from arcpy import env, your script is trying to import env from the arcpy module. Second, according to your screenshot, it seems that the file you have created is called arcpy.py. If instead line 2 was import arcpy, your line 3 would be appropriate. Since you called from arcpy import env, you should set your workspace by changing env.workspace, not. Note that the line numbers I reference below refer to the line numbers in your screenshot.įirstly, arcpy in line 3 is undefined. The Scientific View is essentially trying to offer the capabilities of a Jupyter Notebook within P圜harm.A couple of errors jump out at me here.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |