Giter VIP home page Giter VIP logo

Comments (6)

moorepants avatar moorepants commented on August 29, 2024

This might be a long standing NumPy/setuptools bug: http://projects.scipy.org/numpy/ticket/860

from yeadon.

moorepants avatar moorepants commented on August 29, 2024

This says it was fixed: numpy/numpy#1458

from yeadon.

chrisdembia avatar chrisdembia commented on August 29, 2024

I had issues doing python setup.py install as well. I also had issues installing yaml; it was looking for a header file and thus was expecting that I had installed the yaml-dev package.

from yeadon.

moorepants avatar moorepants commented on August 29, 2024

I just started with new Ubuntu 13.04 and installed the build dependencies for NumPy. I then created a virtualenv the install worked perfectly for the base package and the doc extra.

$ sudo apt-get build-dep python-numpy
$ mkvirtualenv test
(test)$ pip install yeadon[doc]

Now the gui is another issue when in a virtualenv. It needs access to python-vtk which is a build and runtime dependency for MayaVi. So the following fails:

$ sudo apt-get build-dep mayav2
$ workon test
(test)$ pip install yeadon[gui]

Error is below the text.

I think there is a way to symlink the needed module in the virtualenv to your system install or you can use --system-site-packages on venv creation, but that sorta defeats the purpose of a venv.

I'm not sure how to get nose to install automatically as is. Maybe we need to add a explicit extra_requires for it too. It be nice to have a way to run the tests for the end user too. So after install they type something like:

$ yeadon --test

Error from MayaVi build in venv:

(test)$ pip install yeadon[gui]
Requirement already satisfied (use --upgrade to upgrade): yeadon[gui] in ./envs/test/lib/python2.7/site-packages
  Installing extra requirements: 'gui'
Requirement already satisfied (use --upgrade to upgrade): numpy in ./envs/test/lib/python2.7/site-packages (from yeadon[gui])
Requirement already satisfied (use --upgrade to upgrade): pyyaml in ./envs/test/lib/python2.7/site-packages (from yeadon[gui])
Downloading/unpacking mayavi (from yeadon[gui])
  Downloading mayavi-4.3.0.tar.gz (7.7MB): 7.7MB downloaded
  Running setup.py egg_info for package mayavi
    build_src
    building extension "tvtk.array_ext" sources
    building data_files sources
    build_src: building npy-pkg config files

    no previously-included directories found matching 'artwork'
    no previously-included directories found matching 'docs/pdf'
Downloading/unpacking apptools (from mayavi->yeadon[gui])
  Downloading apptools-4.2.0.tar.gz (275kB): 275kB downloaded
  Running setup.py egg_info for package apptools

Downloading/unpacking traits (from mayavi->yeadon[gui])
  Downloading traits-4.3.0.tar.gz (4.9MB): 4.9MB downloaded
  Running setup.py egg_info for package traits

Downloading/unpacking traitsui (from mayavi->yeadon[gui])
  Downloading traitsui-4.3.0.tar.gz (6.7MB): 6.7MB downloaded
  Running setup.py egg_info for package traitsui

Downloading/unpacking configobj (from apptools->mayavi->yeadon[gui])
  Downloading configobj-4.7.2.tar.gz
  Running setup.py egg_info for package configobj

Downloading/unpacking pyface (from traitsui->mayavi->yeadon[gui])
  Downloading pyface-4.3.0.tar.gz (5.1MB): 5.1MB downloaded
  Running setup.py egg_info for package pyface

Installing collected packages: mayavi, apptools, traits, traitsui, configobj, pyface
  Running setup.py install for mayavi
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/home/moorepants/envs/test/build/mayavi/setup.py", line 498, in <module>
        **config
      File "/home/moorepants/envs/test/local/lib/python2.7/site-packages/numpy/distutils/core.py", line 186, in setup
        return old_setup(**new_attr)
      File "/usr/lib/python2.7/distutils/core.py", line 152, in setup
        dist.run_commands()
      File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/home/moorepants/envs/test/local/lib/python2.7/site-packages/numpy/distutils/command/install.py", line 57, in run
        r = self.setuptools_run()
      File "/home/moorepants/envs/test/local/lib/python2.7/site-packages/numpy/distutils/command/install.py", line 31, in setuptools_run
        return old_install_mod._install.run(self)
      File "/usr/lib/python2.7/distutils/command/install.py", line 601, in run
        self.run_command('build')
      File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/home/moorepants/envs/test/build/mayavi/setup.py", line 303, in run
        build_tvtk_classes_zip()
      File "/home/moorepants/envs/test/build/mayavi/setup.py", line 290, in build_tvtk_classes_zip
        gen_tvtk_classes_zip()
      File "tvtk/setup.py", line 46, in gen_tvtk_classes_zip
        from code_gen import TVTKGenerator
      File "tvtk/code_gen.py", line 10, in <module>
        import vtk
    ImportError: No module named vtk
    Complete output from command /home/moorepants/envs/test/bin/python -c "import setuptools;__file__='/home/moorepants/envs/test/build/mayavi/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-5EqW9q-record/install-record.txt --single-version-externally-managed --install-headers /home/moorepants/envs/test/include/site/python2.7:
    running install

running build

Traceback (most recent call last):

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

  File "/home/moorepants/envs/test/build/mayavi/setup.py", line 498, in <module>

    **config

  File "/home/moorepants/envs/test/local/lib/python2.7/site-packages/numpy/distutils/core.py", line 186, in setup

    return old_setup(**new_attr)

  File "/usr/lib/python2.7/distutils/core.py", line 152, in setup

    dist.run_commands()

  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands

    self.run_command(cmd)

  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command

    cmd_obj.run()

  File "/home/moorepants/envs/test/local/lib/python2.7/site-packages/numpy/distutils/command/install.py", line 57, in run

    r = self.setuptools_run()

  File "/home/moorepants/envs/test/local/lib/python2.7/site-packages/numpy/distutils/command/install.py", line 31, in setuptools_run

    return old_install_mod._install.run(self)

  File "/usr/lib/python2.7/distutils/command/install.py", line 601, in run

    self.run_command('build')

  File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command

    self.distribution.run_command(command)

  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command

    cmd_obj.run()

  File "/home/moorepants/envs/test/build/mayavi/setup.py", line 303, in run

    build_tvtk_classes_zip()

  File "/home/moorepants/envs/test/build/mayavi/setup.py", line 290, in build_tvtk_classes_zip

    gen_tvtk_classes_zip()

  File "tvtk/setup.py", line 46, in gen_tvtk_classes_zip

    from code_gen import TVTKGenerator

  File "tvtk/code_gen.py", line 10, in <module>

    import vtk

ImportError: No module named vtk

----------------------------------------
Command /home/moorepants/envs/test/bin/python -c "import setuptools;__file__='/home/moorepants/envs/test/build/mayavi/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-5EqW9q-record/install-record.txt --single-version-externally-managed --install-headers /home/moorepants/envs/test/include/site/python2.7 failed with error code 1 in /home/moorepants/envs/test/build/mayavi
Storing complete log in /tmp/tmpJ_dxnh

from yeadon.

moorepants avatar moorepants commented on August 29, 2024

anaconda comes with mayavi (so does enthought's distribution). It's probably best to install from there. You may be able to get Mayavi running in a virtualenv by sym (or hard) linking to the system install.

from yeadon.

moorepants avatar moorepants commented on August 29, 2024

I'm going to close this. It works for basic install but will not work for the [gui] install because Mayavi is a pain to install with pip.

from yeadon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.