enthought / mayavi

3D visualization of scientific data in Python
http://docs.enthought.com/mayavi/mayavi/
Other
1.3k stars 285 forks source link

pip install fails on OSX #713

Closed aliounis closed 5 years ago

aliounis commented 6 years ago

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 commented 6 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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