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

pip install fails on OSX #713

Closed
aliounis opened this issue Sep 11, 2018 · 4 comments
Closed

pip install fails on OSX #713

aliounis opened this issue Sep 11, 2018 · 4 comments

Comments

@aliounis
Copy link

When attempting to install mayavi through pip on OSX it fails with the error

pip install mayavi
Collecting mayavi
 Downloading https://files.pythonhosted.org/packages/83/9e/293ba57353ed258c2f64d54bf00ca1447c1f38f4eb60d0e762ddec57bf51/mayavi-4.6.2.tar.bz2 (7.0MB)
   100% |################################| 7.0MB 223kB/s
   Complete output from command python setup.py egg_info:
   Traceback (most recent call last):
     File "<string>", line 1, in <module>
     File "/private/var/folders/lk/yq3grdq95kj0wwlc7wm5wvfrhzcrb2/T/pip-build-uyguxm50/mayavi/setup.py", line 466, in <module>
       long_description=open('README.rst').read(),
     File "/Users/kgetzand/anaconda/lib/python3.5/encodings/ascii.py", line 26, in decode
       return codecs.ascii_decode(input, self.errors)[0]
   UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 7771: ordinal not in range(128)

   ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/lk/yq3grdq95kj0wwlc7wm5wvfrhzcrb2/T/pip-build-uyguxm50/mayavi/

This appears to be an issue with reading the readme as the long description in setup.py. Changing line 466 in setup.py to
long_description=open('README.rst', encoding='utf-8').read(),
fixes this issue.

@prabhuramachandran
Copy link
Member

Sigh, sorry about that and thanks for the report. You could send a PR if you have the time, or I will get to it soon.

@Karthikeyanc2
Copy link

Same issue in line 44

exec(compile(open(fname).read(), fname, 'exec'), info)

exec(compile(open(fname, encoding='utf-8').read(), fname, 'exec'), info) fixed the problem

@ngoettin
Copy link

ngoettin commented Aug 8, 2022

The install still fails for me on a clean python installation:

        ...
        File "/home/XXX/.pyenv/versions/3.10.6/lib/python3.10/site-packages/numpy/distutils/ccompiler_opt.py", line 717, in _dist_test_spawn
          o = subprocess.check_output(cmd, stderr=subprocess.STDOUT,
        File "/home/XXX/.pyenv/versions/3.10.6/lib/python3.10/subprocess.py", line 420, in check_output
          return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
        File "/home/XXX/.pyenv/versions/3.10.6/lib/python3.10/subprocess.py", line 503, in run
          stdout, stderr = process.communicate(input, timeout=timeout)
        File "/home/XXX/.pyenv/versions/3.10.6/lib/python3.10/subprocess.py", line 1139, in communicate
          stdout = self.stdout.read()
        File "/home/XXX/.pyenv/versions/3.10.6/lib/python3.10/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 232: ordinal not in range(128)
      INFO: CCompilerOpt.cache_flush[825] : write cache to path -> /tmp/pip-install-5t66sm_k/mayavi_7045aac097464082b5c9f41847846c68/build/temp.linux-x86_64-cpython-310/ccompiler_opt_cache_ext.py

There seems to be a fix in the arch repos

@zjwzcx
Copy link

zjwzcx commented Aug 12, 2022

Hi, have you solved this problem? Could you please share your solution?

The install still fails for me on a clean python installation:

        ...
        File "/home/XXX/.pyenv/versions/3.10.6/lib/python3.10/site-packages/numpy/distutils/ccompiler_opt.py", line 717, in _dist_test_spawn
          o = subprocess.check_output(cmd, stderr=subprocess.STDOUT,
        File "/home/XXX/.pyenv/versions/3.10.6/lib/python3.10/subprocess.py", line 420, in check_output
          return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
        File "/home/XXX/.pyenv/versions/3.10.6/lib/python3.10/subprocess.py", line 503, in run
          stdout, stderr = process.communicate(input, timeout=timeout)
        File "/home/XXX/.pyenv/versions/3.10.6/lib/python3.10/subprocess.py", line 1139, in communicate
          stdout = self.stdout.read()
        File "/home/XXX/.pyenv/versions/3.10.6/lib/python3.10/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 232: ordinal not in range(128)
      INFO: CCompilerOpt.cache_flush[825] : write cache to path -> /tmp/pip-install-5t66sm_k/mayavi_7045aac097464082b5c9f41847846c68/build/temp.linux-x86_64-cpython-310/ccompiler_opt_cache_ext.py

There seems to be a fix in the arch repos

Hi, have you solved this problem? Could you please share your solution? @ngoettin

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

5 participants