Hopefully someone can help me...
I've used pip to install the resource library;
pip install resource
Collecting resource
Using cached https://files.pythonhosted.org/packages/...ne-any.whl
Requirement already satisfied: python-easyconfig>=0.1.0 in c:\python27\arcgis10.5\lib\site-packages (from resource) (0.1.7)
Requirement already satisfied: JsonSir>=0.0.2 in c:\python27\arcgis10.5\lib\site-packages (from resource) (0.0.2)
Requirement already satisfied: JsonForm>=0.0.2 in c:\python27\arcgis10.5\lib\site-packages (from resource) (0.0.2)
Requirement already satisfied: PyYAML in c:\python27\arcgis10.5\lib\site-packages (from python-easyconfig>=0.1.0->resource) (5.1.2)
Requirement already satisfied: six in c:\python27\arcgis10.5\lib\site-packages (from python-easyconfig>=0.1.0->resource) (1.10.0)
Requirement already satisfied: jsonschema in c:\python27\arcgis10.5\lib\site-packages (from JsonForm>=0.0.2->resource) (3.1.1)
Requirement already satisfied: importlib-metadata in c:\python27\arcgis10.5\lib\site-packages (from jsonschema->JsonForm>=0.0.2->resource) (0.23)
Requirement already satisfied: setuptools in c:\python27\arcgis10.5\lib\site-packages (from jsonschema->JsonForm>=0.0.2->resource) (28.8.0)
Requirement already satisfied: attrs>=17.4.0 in c:\python27\arcgis10.5\lib\site-packages (from jsonschema->JsonForm>=0.0.2->resource) (19.3.0)
Requirement already satisfied: functools32; python_version < "3" in c:\python27\arcgis10.5\lib\site-packages (from jsonschema->JsonForm>=0.0.2->resource) (3.2.3.post2)
Requirement already satisfied: pyrsistent>=0.14.0 in c:\python27\arcgis10.5\lib\site-packages (from jsonschema->JsonForm>=0.0.2->resource) (0.15.4)
Requirement already satisfied: configparser>=3.5; python_version < "3" in c:\python27\arcgis10.5\lib\site-packages (from importlib-metadata->jsonschema->JsonForm>=0.0.2->resource) (4.0.2)
Requirement already satisfied: contextlib2; python_version < "3" in c:\python27\arcgis10.5\lib\site-packages (from importlib-metadata->jsonschema->JsonForm>=0.0.2->resource) (0.6.0.post1)
Requirement already satisfied: pathlib2; python_version == "3.4.*" or python_version < "3" in c:\python27\arcgis10.5\lib\site-packages (from importlib-metadata->jsonschema->JsonForm>=0.0.2->resource) (2.3.5)
Requirement already satisfied: zipp>=0.5 in c:\python27\arcgis10.5\lib\site-packages (from importlib-metadata->jsonschema->JsonForm>=0.0.2->resource) (0.6.0)
Requirement already satisfied: scandir; python_version < "3.5" in c:\python27\arcgis10.5\lib\site-packages (from pathlib2; python_version == "3.4.*" or python_version < "3"->importlib-metadata->jsonschema->JsonForm>=0.0.2->resource) (1.10.0)
Requirement already satisfied: more-itertools in c:\python27\arcgis10.5\lib\site-packages (from zipp>=0.5->importlib-metadata->jsonschema->JsonForm>=0.0.2->resource) (5.0.0)
Installing collected packages: resource
Successfully installed resource-0.2.1
The install reports as successful!!!
When I run the following code (i.e. import the library within a try loop) I get the message "No module named resource";
Thanks
I've used pip to install the resource library;
pip install resource
Collecting resource
Using cached https://files.pythonhosted.org/packages/...ne-any.whl
Requirement already satisfied: python-easyconfig>=0.1.0 in c:\python27\arcgis10.5\lib\site-packages (from resource) (0.1.7)
Requirement already satisfied: JsonSir>=0.0.2 in c:\python27\arcgis10.5\lib\site-packages (from resource) (0.0.2)
Requirement already satisfied: JsonForm>=0.0.2 in c:\python27\arcgis10.5\lib\site-packages (from resource) (0.0.2)
Requirement already satisfied: PyYAML in c:\python27\arcgis10.5\lib\site-packages (from python-easyconfig>=0.1.0->resource) (5.1.2)
Requirement already satisfied: six in c:\python27\arcgis10.5\lib\site-packages (from python-easyconfig>=0.1.0->resource) (1.10.0)
Requirement already satisfied: jsonschema in c:\python27\arcgis10.5\lib\site-packages (from JsonForm>=0.0.2->resource) (3.1.1)
Requirement already satisfied: importlib-metadata in c:\python27\arcgis10.5\lib\site-packages (from jsonschema->JsonForm>=0.0.2->resource) (0.23)
Requirement already satisfied: setuptools in c:\python27\arcgis10.5\lib\site-packages (from jsonschema->JsonForm>=0.0.2->resource) (28.8.0)
Requirement already satisfied: attrs>=17.4.0 in c:\python27\arcgis10.5\lib\site-packages (from jsonschema->JsonForm>=0.0.2->resource) (19.3.0)
Requirement already satisfied: functools32; python_version < "3" in c:\python27\arcgis10.5\lib\site-packages (from jsonschema->JsonForm>=0.0.2->resource) (3.2.3.post2)
Requirement already satisfied: pyrsistent>=0.14.0 in c:\python27\arcgis10.5\lib\site-packages (from jsonschema->JsonForm>=0.0.2->resource) (0.15.4)
Requirement already satisfied: configparser>=3.5; python_version < "3" in c:\python27\arcgis10.5\lib\site-packages (from importlib-metadata->jsonschema->JsonForm>=0.0.2->resource) (4.0.2)
Requirement already satisfied: contextlib2; python_version < "3" in c:\python27\arcgis10.5\lib\site-packages (from importlib-metadata->jsonschema->JsonForm>=0.0.2->resource) (0.6.0.post1)
Requirement already satisfied: pathlib2; python_version == "3.4.*" or python_version < "3" in c:\python27\arcgis10.5\lib\site-packages (from importlib-metadata->jsonschema->JsonForm>=0.0.2->resource) (2.3.5)
Requirement already satisfied: zipp>=0.5 in c:\python27\arcgis10.5\lib\site-packages (from importlib-metadata->jsonschema->JsonForm>=0.0.2->resource) (0.6.0)
Requirement already satisfied: scandir; python_version < "3.5" in c:\python27\arcgis10.5\lib\site-packages (from pathlib2; python_version == "3.4.*" or python_version < "3"->importlib-metadata->jsonschema->JsonForm>=0.0.2->resource) (1.10.0)
Requirement already satisfied: more-itertools in c:\python27\arcgis10.5\lib\site-packages (from zipp>=0.5->importlib-metadata->jsonschema->JsonForm>=0.0.2->resource) (5.0.0)
Installing collected packages: resource
Successfully installed resource-0.2.1
The install reports as successful!!!
When I run the following code (i.e. import the library within a try loop) I get the message "No module named resource";
try: import resource except Exception, e: print str(e) booContinue = 0Please note that I'm using Python 2.7 due to compatibility with third party libaries.
Thanks