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 doesn't work #1015

Closed
ipashchenko opened this issue Mar 2, 2021 · 6 comments
Closed

pip install doesn't work #1015

ipashchenko opened this issue Mar 2, 2021 · 6 comments

Comments

@ipashchenko
Copy link

ipashchenko commented Mar 2, 2021

Manjaro linux
vtk 8.2.0-17
python-pyqt5 5.15.2-3

Installing mayavi with:

$ pip install mayavi --user

First, it downloads several previous versions. It fails several times showing that some libraries are not installed (vtk dependensies?): pdal, unixodbc, pugixml, gdal, proj, netcdf, hdf5. Even after installing them manually, it fails with the following error:

Collecting mayavi
  Using cached mayavi-4.7.2.tar.gz (7.1 MB)
Requirement already satisfied: apptools in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (5.1.0)
Requirement already satisfied: numpy in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (1.20.1)
Requirement already satisfied: pyface>=6.1.1 in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (7.3.0)
Requirement already satisfied: pygments in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (2.8.0)
Requirement already satisfied: traits>=6.0.0 in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (6.2.0)
Requirement already satisfied: traitsui>=7.0.0 in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (7.1.1)
  Using cached mayavi-4.7.1.tar.bz2 (7.0 MB)
Requirement already satisfied: apptools in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (5.1.0)
Requirement already satisfied: numpy in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (1.20.1)
Requirement already satisfied: pyface>=6.1.1 in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (7.3.0)
Requirement already satisfied: pygments in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (2.8.0)
Requirement already satisfied: traits>=4.6.0 in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (6.2.0)
Requirement already satisfied: traitsui>=6.0.0 in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (7.1.1)
  Using cached mayavi-4.7.0.tar.bz2 (7.0 MB)
Requirement already satisfied: apptools in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (5.1.0)
Requirement already satisfied: numpy in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (1.20.1)
Requirement already satisfied: pyface>=6.1.1 in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (7.3.0)
Requirement already satisfied: pygments in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (2.8.0)
Requirement already satisfied: traits>=4.6.0 in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (6.2.0)
Requirement already satisfied: traitsui>=6.0.0 in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (7.1.1)
  Using cached mayavi-4.6.2.tar.bz2 (7.0 MB)
Requirement already satisfied: apptools in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (5.1.0)
Requirement already satisfied: numpy in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (1.20.1)
Requirement already satisfied: pyface>=6.0.0 in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (7.3.0)
Requirement already satisfied: pygments in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (2.8.0)
Requirement already satisfied: traits>=4.6.0 in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (6.2.0)
Requirement already satisfied: traitsui>=6.0.0 in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (7.1.1)
  Using cached mayavi-4.6.1.tar.bz2 (7.0 MB)
Requirement already satisfied: apptools in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (5.1.0)
Requirement already satisfied: numpy in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (1.20.1)
Requirement already satisfied: pyface>=6.0.0 in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (7.3.0)
Requirement already satisfied: pygments in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (2.8.0)
Requirement already satisfied: traits>=4.6.0 in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (6.2.0)
Requirement already satisfied: traitsui>=6.0.0 in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (7.1.1)
  Using cached mayavi-4.6.0.tar.bz2 (7.0 MB)
Requirement already satisfied: apptools in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (5.1.0)
Requirement already satisfied: numpy in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (1.20.1)
Requirement already satisfied: pyface>=6.0.0 in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (7.3.0)
Requirement already satisfied: pygments in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (2.8.0)
Requirement already satisfied: traits>=4.6.0 in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (6.2.0)
Requirement already satisfied: traitsui>=6.0.0 in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (7.1.1)
  Using cached mayavi-4.5.0.zip (7.5 MB)
Requirement already satisfied: apptools in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (5.1.0)
Requirement already satisfied: traits in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (6.2.0)
Requirement already satisfied: traitsui in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (7.1.1)
Requirement already satisfied: configobj in /home/ilya/.local/lib/python3.9/site-packages (from apptools->mayavi) (5.0.6)
Requirement already satisfied: traitsui in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (7.1.1)
Requirement already satisfied: six in /usr/lib/python3.9/site-packages (from configobj->apptools->mayavi) (1.15.0)
Requirement already satisfied: traits in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (6.2.0)
Requirement already satisfied: pyface>=7.1.0 in /home/ilya/.local/lib/python3.9/site-packages (from traitsui->mayavi) (7.3.0)
Requirement already satisfied: importlib-metadata in /usr/lib/python3.9/site-packages (from pyface>=7.1.0->traitsui->mayavi) (3.4.0)
Requirement already satisfied: importlib-resources>=1.1.0 in /home/ilya/.local/lib/python3.9/site-packages (from pyface>=7.1.0->traitsui->mayavi) (5.1.1)
Requirement already satisfied: traits in /home/ilya/.local/lib/python3.9/site-packages (from mayavi) (6.2.0)
Requirement already satisfied: zipp>=0.5 in /usr/lib/python3.9/site-packages (from importlib-metadata->pyface>=7.1.0->traitsui->mayavi) (3.4.0)
Using legacy 'setup.py install' for mayavi, since package 'wheel' is not installed.
Installing collected packages: mayavi
    Running setup.py install for mayavi ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-tmtv987a/mayavi_2f71dd9940dc4376b0d15ad069205815/setup.py'"'"'; __file__='"'"'/tmp/pip-install-tmtv987a/mayavi_2f71dd9940dc4376b0d15ad069205815/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-cr2qh713/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/ilya/.local/include/python3.9/mayavi
         cwd: /tmp/pip-install-tmtv987a/mayavi_2f71dd9940dc4376b0d15ad069205815/
    Complete output (78 lines):
    running install
    running build
    ----------------------------------------------------------------------
    Building TVTK classes... vtkContextDevice2D: Ignoring method: Get/SetViewportRect
    default: [-1787542096, 32703, -1787542096, 32703], range: None
    vtkContextDevice2D: Ignoring method: Get/SetViewportSize
    default: [-1787542096, 32703], range: None
    vtkFXAAOptions: Ignoring method: Get/SetDebugOptionValue
    default: 0, range: None
    vtkGeoTreeNode: Ignoring method: Get/SetStatus
    default: 0, range: None
    vtkIncrementalForceLayout: Ignoring method: Get/SetGravityPoint
    default: [200.0, 200.0], range: None
    vtkOpenGLBufferObject: Ignoring method: Get/SetType
    default: 0, range: None
    vtkRenderWidget: Ignoring method: Get/SetPosition
    default: [0, 0], range: None
    vtkRenderWidget: Ignoring method: Get/SetSize
    default: [300, 300], range: None
    vtkShader: Ignoring method: Get/SetType
    default: 3, range: None
    vtkVolumeTexture: Ignoring method: Get/SetPartitions
    default: [1, 1, 1], range: None
    vtkChartMatrix: Ignoring method: Get/SetGutter
    default: [15.0, 15.0], range: None
    vtkChartMatrix: Ignoring method: Get/SetSize
    default: [0, 0], range: None
    vtkContextArea: Ignoring method: Get/SetDrawAreaBounds
    default: [0.0, 0.0, 300.0, 300.0], range: None
    vtkContextArea: Ignoring method: Get/SetDrawAreaResizeBehavior
    default: 0, range: None
    vtkContextArea: Ignoring method: Get/SetFixedMargins
    default: [0, 0, 0, 0], range: None
    vtkContextArea: Ignoring method: Get/SetFixedRect
    default: [0, 0, 300, 300], range: None
    vtkContextArea: Ignoring method: Get/SetGeometry
    default: [0, 0, 300, 300], range: None
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-tmtv987a/mayavi_2f71dd9940dc4376b0d15ad069205815/setup.py", line 442, in <module>
        numpy.distutils.core.setup(
      File "/home/ilya/.local/lib/python3.9/site-packages/numpy/distutils/core.py", line 169, in setup
        return old_setup(**new_attr)
      File "/usr/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.9/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.9/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.9/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/home/ilya/.local/lib/python3.9/site-packages/numpy/distutils/command/install.py", line 60, in run
        r = self.setuptools_run()
      File "/home/ilya/.local/lib/python3.9/site-packages/numpy/distutils/command/install.py", line 34, in setuptools_run
        return distutils_install.run(self)
      File "/usr/lib/python3.9/distutils/command/install.py", line 546, in run
        self.run_command('build')
      File "/usr/lib/python3.9/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.9/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/tmp/pip-install-tmtv987a/mayavi_2f71dd9940dc4376b0d15ad069205815/setup.py", line 311, in run
        build_tvtk_classes_zip()
      File "/tmp/pip-install-tmtv987a/mayavi_2f71dd9940dc4376b0d15ad069205815/setup.py", line 297, in build_tvtk_classes_zip
        gen_tvtk_classes_zip()
      File "tvtk/setup.py", line 66, in gen_tvtk_classes_zip
        from setuptools import Command
      File "/tmp/pip-install-tmtv987a/mayavi_2f71dd9940dc4376b0d15ad069205815/tvtk/code_gen.py", line 123, in generate_code
        self._write_wrapper_class(node, tvtk_name)
      File "/tmp/pip-install-tmtv987a/mayavi_2f71dd9940dc4376b0d15ad069205815/tvtk/code_gen.py", line 210, in _write_wrapper_class
        self.wrap_gen.generate_code(node, out)
      File "/tmp/pip-install-tmtv987a/mayavi_2f71dd9940dc4376b0d15ad069205815/tvtk/wrapper_gen.py", line 243, in generate_code
        self._gen_class_init(node, out)
      File "/tmp/pip-install-tmtv987a/mayavi_2f71dd9940dc4376b0d15ad069205815/tvtk/wrapper_gen.py", line 315, in _gen_class_init
        self.dm.write_class_doc(klass.__doc__, out, indent)
      File "/tmp/pip-install-tmtv987a/mayavi_2f71dd9940dc4376b0d15ad069205815/tvtk/indenter.py", line 169, in write_class_doc
        out.write(indent.format('\n' + ret))
    UnicodeEncodeError: 'ascii' codec can't encode character '\xe9' in position 541: ordinal not in range(128)
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-tmtv987a/mayavi_2f71dd9940dc4376b0d15ad069205815/setup.py'"'"'; __file__='"'"'/tmp/pip-install-tmtv987a/mayavi_2f71dd9940dc4376b0d15ad069205815/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-cr2qh713/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/ilya/.local/include/python3.9/mayavi Check the logs for full command output.
@rahulporuri
Copy link
Contributor

Thanks @ipashchenko for the bug report. I hope you don't mind that I added some markdown formatting to make the code/command output easier to read.

@ipashchenko
Copy link
Author

Thanks @ipashchenko for the bug report. I hope you don't mind that I added some markdown formatting to make the code/command output easier to read.

Thank you, @rahulporuri ! I have Python 3.9 and this issue is possibly connected with #940

@rahulporuri
Copy link
Contributor

Thank you, @rahulporuri ! I have Python 3.9 and this issue is possibly connected with #940

Does that mean that you are able to install mayavi from the Git source without the above issue?

@ipashchenko
Copy link
Author

Thank you, @rahulporuri ! I have Python 3.9 and this issue is possibly connected with #940

Does that mean that you are able to install mayavi from the Git source without the above issue?

Now I'm trying to install VTK from github. Then will try to install mayavi from github as suggested in #940

@ipashchenko
Copy link
Author

Following steps in #940 (first installing VTK from github, then installing mayavi w/o vtk deps, e.g. https://docs.pyvista.org/extras/building_vtk.html) solved the issue.

@rahulporuri
Copy link
Contributor

thanks for reporting back @ipashchenko !

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

2 participants