6

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:

https://www.esri.com/arcgis-blog/products/arcgis-desktop/analytics/a-simple-approach-for-including-3rd-party-python-libraries-with-your-scripts/

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.

2
  • 3
    Do 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. Commented May 3, 2016 at 3:17
  • 1
    The Esri blog article has moved here: esri.com/arcgis-blog/products/arcgis-desktop/analytics/…
    – user126691
    Commented Aug 14, 2018 at 16:54

3 Answers 3

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

1

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.

4
  • 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
    Commented 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
    Commented May 2, 2016 at 23:53
  • open the arcgis python window and try and import those libraries see what happens
    – ziggy
    Commented May 2, 2016 at 23:54
  • 3
    if the libraries are not installed you might have to use pip to install them or run there setup.py files
    – ziggy
    Commented May 3, 2016 at 0:00
1

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.

1
  • 1
    This seems to be effectively the same answer as given by @ziggy
    – nmtoken
    Commented Jan 11, 2018 at 10:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.