I'm running ArcMap 10.2.2 for desktop and have Python 2.7 installed as part of the software package. I'm trying to get the pyexcel and xlutils libraries installed. I ran a script to find the path of the arcpy module and figured this is where I would have to copy other libraries to in order to import them into my Python scripts. This is after reading the following article by ESRI:
I now have both the pyexcel and xlutils folders in Python27/ArcGIS10.2/Lib/site-packages but am getting the generic import error stating the module does not exist when trying to import the modules.
Do I have to run pip in order to make these libraries available> I don't have admin rights to my machine and am dependent on IT staff to do anything requiring access to program files.
-
3Do you by any chance have more than one python install? This sort of thing happens frequently if python isn't fully removed when upgrading ArcGis or if you have had installed a different version of python. Ensure your new libs are the right platform for your ArcGis/python - usually 32bit unless you want to use it with background 64bit, which I have found to be more hassle than it's worth.Michael Stimson– Michael Stimson2016年05月03日 03:17:02 +00:00Commented May 3, 2016 at 3:17
-
1The Esri blog article has moved here: esri.com/arcgis-blog/products/arcgis-desktop/analytics/…user126691– user1266912018年08月14日 16:54:30 +00:00Commented Aug 14, 2018 at 16:54
3 Answers 3
If you do this on windows, you can do this through cmd prompt and use setup tools. I have to do it on a restricted computer all the time. I just install the source setup.py files as ziggy has suggested.
https://pypi.python.org/pypi/setuptools
In command prompt, change your directory to the location where you have extracted the package that you want to install. (Do setup tools first).
https://pypi.python.org/pypi/setuptools
cd c:/theLocationOfYourPackage
if you are saving the extracted to packages to d you will need to use the method here to change the directory to D or other drive:
https://superuser.com/questions/135214/using-cd-command-in-windows-command-line-cant-navigate-to-d
then type the location of your python install, and then setup.py install
C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy folder\python.exe setup.py install
Take those installed libraries and copy them into your C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy folder
or where ever your ArcPy downloads are
They may be installed already so if you import them just using python they may just work.
-
I ran a script to get the path of of where the arcpy module lives and had the folders copied there. Do I need to expose the files and folders within the xlutils-1.7.7 folder?geoJshaun– geoJshaun2016年05月02日 23:36:42 +00:00Commented May 2, 2016 at 23:36
-
I think you should be good if you 1. installed the libraries and they work when you import them in python 2. copied those files into where the arcpy files are.ziggy– ziggy2016年05月02日 23:53:52 +00:00Commented May 2, 2016 at 23:53
-
open the arcgis python window and try and import those libraries see what happensziggy– ziggy2016年05月02日 23:54:20 +00:00Commented May 2, 2016 at 23:54
-
3if the libraries are not installed you might have to use pip to install them or run there setup.py filesziggy– ziggy2016年05月03日 00:00:07 +00:00Commented May 3, 2016 at 0:00
If the arcpy packages are at,
arcgis/server/arcpy/
You could just paste the package/module which you want in that folder and should be able to access them by importing in the arcpy shell.
-
1This seems to be effectively the same answer as given by @ziggynmtoken– nmtoken2018年01月11日 10:59:20 +00:00Commented Jan 11, 2018 at 10:59
Explore related questions
See similar questions with these tags.