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

Does not install with pip3 #18

Open
timrichd opened this issue Aug 5, 2016 · 6 comments
Open

Does not install with pip3 #18

timrichd opened this issue Aug 5, 2016 · 6 comments

Comments

@timrichd
Copy link

timrichd commented Aug 5, 2016

root@5da98a0113fa:/# pip install featureforge
bash: pip: command not found
root@5da98a0113fa:/# pip3 install featureforge
Downloading/unpacking featureforge
  Downloading featureforge-0.1.6.tar.gz
  Running setup.py (path:/tmp/pip_build_root/featureforge/setup.py) egg_info for package featureforge
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip_build_root/featureforge/setup.py", line 11, in <module>
        long_description = open(os.path.join(base_path, 'README.rst')).read()
      File "/usr/lib/python3.4/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 1383: ordinal not in range(128)
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pip_build_root/featureforge/setup.py", line 11, in <module>

    long_description = open(os.path.join(base_path, 'README.rst')).read()

  File "/usr/lib/python3.4/encodings/ascii.py", line 26, in decode

    return codecs.ascii_decode(input, self.errors)[0]

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 1383: ordinal not in range(128)

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/featureforge
Storing debug log for failure in /root/.pip/pip.log
@jbigatti
Copy link
Contributor

I cannot reproduce this issue. I tried with Python 3.5 and Python 3.4.
I've tried long_description = open(os.path.join(base_path, 'README.rst')).read() manually and worked fine.
Would you please provide more information about the enviroment?

@dmoisset
Copy link
Contributor

Probably the success/failure depends on your default system encoding (my guess is that @timrichd is running this on a container with minimal locale support)... One fix would be to add encoding='utf-8' to the open call (although that will help only if python2 support is dropped)

@timrichd
Copy link
Author

I was running this in a python docker container, can't remember which ATM, @dmoisset suggestion sounds like a good fix.

Will add more details and try the suggested fix once I'm home.

@starplanet
Copy link

I have the same problem, I use fresh ubuntu installation in docker and when I pip install featureforge, it will report the following error info:

Collecting featureforge
  Downloading http://mirrors.aliyun.com/pypi/packages/67/cb/d081c130e4f064ab0e74c78d84f984053391bdf2fea1d48a8b015ad59c12/featureforge-0.1.6.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-build-2l4u23ic/featureforge/setup.py", line 11, in <module>
        long_description = open(os.path.join(base_path, 'README.rst')).read()
      File "/root/.pyenv/versions/3.6.1/lib/python3.6/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 1383: ordinal not in range(128)

my ubuntu version is Ubuntu 14.04.5 LTS, python version is python 3.6.1

@starplanet
Copy link

I have known the reason. My docker ubuntu LANG environment variable is C, not support utf8. So I change the variable to C.UTF8 and it works.
It's a system environment problem, not a software problem.

@timrichd
Copy link
Author

Maybe you guys should put a error message warning about the LANG env variable

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

No branches or pull requests

4 participants