Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Could not install package via pip #476

Closed
pozzolana93 opened this issue Jun 12, 2020 · 2 comments · Fixed by #477
Closed

Could not install package via pip #476

pozzolana93 opened this issue Jun 12, 2020 · 2 comments · Fixed by #477
Milestone

Comments

@pozzolana93
Copy link

Please read these guidelines before opening an issue.

Bug Description

When trying to install python-cloudant via pip, the installation fails:

Collecting cloudant
  Downloading cloudant-2.13.0.tar.gz (60 kB)
     |████████████████████████████████| 60 kB 5.2 MB/s 
    ERROR: Command errored out with exit status 1:
     command: /home/simone/Documents/sl-couchdb/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-RLoSst/cloudant/setup.py'"'"'; __file__='"'"'/tmp/pip-install-RLoSst/cloudant/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-BT2hBm
         cwd: /tmp/pip-install-RLoSst/cloudant/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-RLoSst/cloudant/setup.py", line 33, in <module>
        with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
    TypeError: 'encoding' is an invalid keyword argument for this function
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Installing version 2.12.0 works fine.

1. Steps to reproduce and the simplest code sample possible to demonstrate the issue

On python 2.7 run pip install cloudant

2. What you expected to happen

The python package should be installed

3. What actually happened

The installation fails

Environment details

Cloudant version = 2.13.0
Python version = 2.7.17

pozzolana93 pushed a commit to pozzolana93/python-cloudant that referenced this issue Jun 12, 2020
@bessbd
Copy link
Contributor

bessbd commented Jun 15, 2020

Hi @pozzolana93 ,

Thank you for this ticket!
According to https://www.python.org/doc/sunset-python-2/ , Python 2 is not supported since January 1, 2020.
Can you please try installing python-cloudant on a recent Python 3 version and confirm if the issue still persists?

Thank you,

Donat

@pozzolana93
Copy link
Author

Hello,
sorry for the late reply. The installation works fine on Python 3, but unfortunately I need to work with Python 2. The problem should be easy to fix, it's just due to the encoding argument while opening the README file. If you prefer to drop support to Python 2, just remove the compatibility with Python 2 and I will continue to use version 2.12.0 of the library.

@ricellis ricellis added this to the 2.next milestone Aug 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants