[ckan-dev] Installing CKAN on Debian 9.5 from source issue

PIERRE Sylvain sylvain.pierre at bas-rhin.fr
Thu Mar 28 11:24:23 UTC 2019


Thanks Harald,

Yes it seems to be a Debian issue:
https://bugs.python.org/issue35334

But no simple workaround at this time for me... :-(

My full log of virtualenv command:
--------------------------------------------------------------------------
Running virtualenv with interpreter /usr/bin/python2.7
New python executable in /usr/lib/ckan/default/bin/python2.7
Not overwriting existing python script /usr/lib/ckan/default/bin/python (you must use /usr/lib/ckan/default/bin/python2.7)
Installing setuptools, pkg_resources, pip, wheel...
  Complete output from command /usr/lib/ckan/default/bin/python2.7 - setuptools pkg_resources pip wheel:
  Collecting setuptools
Exception:
Traceback (most recent call last):
  File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/commands/install.py", line 353, in run
    wb.build(autobuilding=True)
  File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
  File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/req/req_set.py", line 554, in _prepare_file
    require_hashes
  File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/req/req_install.py", line 278, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/index.py", line 465, in find_requirement
    all_candidates = self.find_all_candidates(req.name)
  File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/index.py", line 423, in find_all_candidates
    for page in self._get_pages(url_locations, project_name):
  File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/index.py", line 568, in _get_pages
    page = self._get_page(location)
  File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/index.py", line 683, in _get_page
    return HTMLPage.get_page(link, session=self.session)
  File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/index.py", line 792, in get_page
    "Cache-Control": "max-age=600",
  File "/usr/lib/ckan/default/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py", line 501, in get
    return self.request('GET', url, **kwargs)
  File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/download.py", line 386, in request
    return super(PipSession, self).request(method, url, *args, **kwargs)
  File "/usr/lib/ckan/default/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py", line 488, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/ckan/default/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py", line 609, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/ckan/default/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/adapter.py", line 47, in send
    resp = super(CacheControlAdapter, self).send(request, **kw)
  File "/usr/lib/ckan/default/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/adapters.py", line 423, in send
    timeout=timeout
  File "/usr/lib/ckan/default/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 643, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/lib/ckan/default/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/util/retry.py", line 315, in increment
    total -= 1
TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'
----------------------------------------
...Installing setuptools, pkg_resources, pip, wheel...done.
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/virtualenv.py", line 2375, in <module>
    main()
  File "/usr/lib/python3/dist-packages/virtualenv.py", line 724, in main
    symlink=options.symlink)
  File "/usr/lib/python3/dist-packages/virtualenv.py", line 992, in create_environment
    download=download,
  File "/usr/lib/python3/dist-packages/virtualenv.py", line 922, in install_wheel
    call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
  File "/usr/lib/python3/dist-packages/virtualenv.py", line 817, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command /usr/lib/ckan/default/bin/python2.7 - setuptools pkg_resources pip wheel failed with error code 2

-----Message d'origine-----
De : ckan-dev [mailto:ckan-dev-bounces at lists.okfn.org] De la part de Harald von Waldow
Envoyé : mercredi 27 mars 2019 23:55
À : ckan-dev at lists.okfn.org
Objet : Re: [ckan-dev] Installing CKAN on Debian 9.5 from source issue

That is not CKAN-related, but I once fixed that error by upgrading pip:

sudo pip install -U pip


On Tue, 26 Mar 2019 14:31:11 +0000
PIERRE Sylvain <sylvain.pierre at bas-rhin.fr> wrote:

> Hi list,
> 
> This is my first post on this list. I’m working in a French local 
> government and we start deploying CKAN.
> 
> I’m trying to install CKAN from source on a Debian 9.8 server with 
> official doc. I ran an issue when passing this command line:
> virtualenv --no-site-packages /usr/lib/ckan/default
> 
> Error returned:
> OSError: Command /usr/lib/ckan/default/bin/python2 - setuptools 
> pkg_resources pip wheel failed with error code 2
> 
> I didn’t find anything related to this online. If someone can help…
> 
> Regards
> 
> Sylvain



--
Harald von Waldow
Eawag
ICT Services
Research Data Management
Ueberlandstrasse 133
8600 Duebendorf
http://www.eawag.ch
https://opendata.eawag.ch


More information about the ckan-dev mailing list