Skip to content
This repository has been archived by the owner on Jun 9, 2021. It is now read-only.

TypeError while installing through pip #121

Closed
sachinchavan9 opened this issue Mar 29, 2019 · 9 comments
Closed

TypeError while installing through pip #121

sachinchavan9 opened this issue Mar 29, 2019 · 9 comments

Comments

@sachinchavan9
Copy link

pip install textpipe
Collecting textpipe
  Downloading https://files.pythonhosted.org/packages/44/0c/e7fafbda3caa0c7f8d6ffbe144d081a596c80d834e17943bbe0f5b31b8e9/textpipe-0.8.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-amdf0b/textpipe/setup.py", line 13, in <module>
        with open(Path(__file__).resolve().parent.joinpath('README.md'), 'r') as fh:
    TypeError: coercing to Unicode: need string or buffer, PosixPath found
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-amdf0b/textpipe/
@anneschuth
Copy link
Member

Thanks for reporting. Which operating system and which python version are using?

@dodijk
Copy link
Member

dodijk commented Mar 29, 2019

I can confirm this issue occurs on Python 2. We are developing only on Python 3.6+. We should at least make that more clear in the README.md. Maybe also test for this in setup.py?

@sachinchavan9
Copy link
Author

Thanks for reporting. Which operating system and which python version are using?

@dodijk is correct I'm using Python2 and my OS is Ubuntu 16.04

@sachinchavan9
Copy link
Author

I can confirm this issue occurs on Python 2. We are developing only on Python 3.6+. We should at least make that more clear in the README.md. Maybe also test for this in setup.py?

Same issue for python3

@anneschuth
Copy link
Member

anneschuth commented Apr 3, 2019 via email

@rafpyprog
Copy link

There is a problem with the cld2-cffi package when compiling with new compilers : GregBowyer/cld2-cffi#21

To install you need to set CFLAGS environment variable:
export CFLAGS="-Wno-narrowing"
pip install textpipe

@tanvi2612
Copy link

The error still exists. When I try installing textpipe on Ubuntu 20.04 using pip3 with python 3.8.5, I get the error

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-etqntwvb/cld2-cffi/setup.py'"'"'; file='"'"'/tmp/pip-install-etqntwvb/cld2-cffi/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-_rslgqqh
cwd: /tmp/pip-install-etqntwvb/cld2-cffi/

The same error occurs when trying to run the code on Google Colab.

@sachinchavan9
Copy link
Author

sachinchavan9 commented Feb 11, 2021

Hi @tanvi2612 can you provide the output of
gcc -v ?

@sachinchavan9
Copy link
Author

@tanvi2612

CFLAGS="-Wno-narrowing" pip install textpipe

this works for me
on Arch Linux witch gcc gcc version 10.2.0 (GCC)

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

No branches or pull requests

5 participants