Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation fails on python 2.7 #305

Open
ccancellieri opened this issue Oct 17, 2021 · 3 comments · May be fixed by #306
Open

Installation fails on python 2.7 #305

ccancellieri opened this issue Oct 17, 2021 · 3 comments · May be fixed by #306

Comments

@ccancellieri
Copy link
Contributor

Hi I'm installing a fresh copy of this plugin over my docker instance and I'm getting:

...
Adding ckanext-scheming 2.1.0 to easy-install.pth file

Installed /srv/app/src_extensions/ckanext-scheming
Processing dependencies for ckanext-scheming==2.1.0
Searching for pyyaml
Reading https://pypi.org/simple/pyyaml/
Downloading https://files.pythonhosted.org/packages/36/2b/61d51a2c4f25ef062ae3f74576b01638bebad5e045f747ff12643df63844/PyYAML-6.0.tar.gz#sha256=68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2
Best match: PyYAML 6.0
Processing PyYAML-6.0.tar.gz
Writing /tmp/easy_install-hdquDQ/PyYAML-6.0/setup.cfg
Running PyYAML-6.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-hdquDQ/PyYAML-6.0/egg-dist-tmp-lli1fC
Traceback (most recent call last):
  File "/srv/app/src_extensions/ckanext-scheming/setup.py", line 43, in <module>
    """,
  File "/usr/lib/python2.7/site-packages/setuptools/__init__.py", line 162, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.7/site-packages/setuptools/command/develop.py", line 38, in run
    self.install_for_development()
  File "/usr/lib/python2.7/site-packages/setuptools/command/develop.py", line 156, in install_for_development
    self.process_distribution(None, self.dist, not self.no_deps)
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 758, in process_distribution
    [requirement], self.local_index, self.easy_install
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 782, in resolve
    replace_conflicting=replace_conflicting
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1065, in best_match
    return self.obtain(req, installer)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1077, in obtain
    return installer(requirement)
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 685, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 711, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 896, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1164, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1150, in run_setup
    run_setup(setup_script, args)
  File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 253, in run_setup
    raise
  File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
    yield
  File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 166, in save_modules
    saved_exc.resume()
  File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 141, in resume
    six.reraise(type, exc, self._tb)
  File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 154, in save_modules
    yield saved
  File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
    yield
  File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 250, in run_setup
    _execfile(setup_script, ns)
  File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 45, in _execfile
    exec(code, globals, locals)
  File "/tmp/easy_install-hdquDQ/PyYAML-6.0/setup.py", line 67, in <module>

This is due to this:
yaml/pyyaml#476

Probably we can enforce the correct version (5.4) here to fix

'pyyaml',

ccancellieri added a commit to ccancellieri/ckanext-scheming that referenced this issue Oct 17, 2021
@ccancellieri ccancellieri linked a pull request Oct 17, 2021 that will close this issue
@ccancellieri
Copy link
Contributor Author

Note: I'm also getting:


Requirement already satisfied: python-slugify>=1.0 in /usr/lib/python2.7/site-packages/python_slugify-5.0.2-py2.7.egg (from ckanapi->ckanext-scheming==2.1.0) (5.0.2)
ERROR: Package 'python-slugify' requires a different Python: 2.7.18 not in '>=3.6'

That could be solved with:

pip install python-slugify==4.0.1

But I'm not sure from which package/plugin it comes (already provided), could it be the core?

@ccancellieri
Copy link
Contributor Author

I also had to do

install_requires=[
-        'pyyaml',
+        'pyyaml==5.4',

@ccancellieri
Copy link
Contributor Author

I think we can set
pyyaml<=5.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant