Reputation: 183
I am trying to install "ckanext-spatial" after CKAN (2.7.1) was installed from package on Ubuntu 14.04. I followed the official tutorial. Everything went well until I ran the following command:
pip install -r pip-requirements.txt
It turns out there is no pip-requirements.txt, so I changed it to
pip install --ignore-installed -r requirements.txt
The error I got is:
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-V6w2Vm/psycopg2/
To solve this error, I have tried upgrade both setuptools and pip. Neither of them worked.
Updated: It turns out the ckanext-spatial is installed under src folder by default.
(default) ubuntu@ckan-ubuntu1404-xlarge:/usr/lib/ckan/default/src$ ls
ckan ckanext-spatial
Now, I can find the pip-requirements.txt file, but I got a new error.
Successfully built GeoAlchemy OWSLib
Installing collected packages: GeoAlchemy, GeoAlchemy2, Shapely, OWSLib, lxml, pyparsing
Exception:
Traceback (most recent call last):
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pip/req/req_set.py", line 784, in install
**kwargs
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pip/req/req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pip/wheel.py", line 345, in move_wheel_files
clobber(source, lib_dir, True)
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pip/wheel.py", line 329, in clobber
os.utime(destfile, (st.st_atime, st.st_mtime))
OSError: [Errno 1] Operation not permitted: '/usr/lib/ckan/default/lib/python2.7/site-packages/sqlalchemy/schema.py'
Upvotes: 0
Views: 754
Reputation: 3224
There is some directory confusion here, which is why you don't see pip-requirements.txt
.
First you need to activate your python environment:
. /usr/lib/ckan/default/bin/activate
Then step 1 of the tutorial:
pip install -e "git+https://github.com/okfn/ckanext-spatial.git#egg=ckanext-spatial"
Then you need to do:
cd ckanext-spatial
before doing:
pip install --ignore-installed -r requirements.txt
Upvotes: 1