Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8509815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:32:12+00:00 2026-06-11T03:32:12+00:00

I need to convert a numpy array to a QtGui.QImage. But I don’t know

  • 0

I need to convert a numpy array to a QtGui.QImage. But I don’t know how to do that. I’ve find this : http://kogs-www.informatik.uni-hamburg.de/~meine/software/qimage2ndarray/ but when I try to install this I get an error :

michael@michael-laptop-ubuntu:~/rubyWorkSpace/pymcs$ easy_install
error: No urls, filenames, or requirements specified (see --help)
michael@michael-laptop-ubuntu:~/rubyWorkSpace/pymcs$ easy_install qimage2ndarraySearching for qimage2ndarray
Reading http://pypi.python.org/simple/qimage2ndarray/
Reading http://kogs-www.informatik.uni-hamburg.de/~meine/software/qimage2ndarray
Reading http://kogs-www.informatik.uni-hamburg.de/~meine/software/qimage2ndarray/dist
Best match: qimage2ndarray 1.0
Downloading http://pypi.python.org/packages/source/q/qimage2ndarray/qimage2ndarray-1.0.zip#md5=5e79e1b45b87aa8e18490162adcce8e4
Processing qimage2ndarray-1.0.zip
Writing /tmp/easy_install-aWUHHO/qimage2ndarray-1.0/setup.cfg
Running qimage2ndarray-1.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-aWUHHO/qimage2ndarray-1.0/egg-dist-tmp-SGavOY
Traceback (most recent call last):
  File "/home/michael/.local/bin/easy_install", line 9, in <module>
    load_entry_point('distribute==0.6.27', 'console_scripts', 'easy_install')()
  File "/home/michael/.local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1915, in main
    with_ei_usage(lambda:
  File "/home/michael/.local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1896, in with_ei_usage
    return f()
  File "/home/michael/.local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1919, in <lambda>
    distclass=DistributionWithoutHelpCommands, **kw
  File "/opt/ActivePython-2.7/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/opt/ActivePython-2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/opt/ActivePython-2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/home/michael/.local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 350, in run
    self.easy_install(spec, not self.no_deps)
  File "/home/michael/.local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 590, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/home/michael/.local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 620, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/home/michael/.local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 814, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/home/michael/.local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1094, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/home/michael/.local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1080, in run_setup
    run_setup(setup_script, args)
  File "/home/michael/.local/lib/python2.7/site-packages/setuptools/sandbox.py", line 30, in run_setup
    lambda: execfile(
  File "/home/michael/.local/lib/python2.7/site-packages/setuptools/sandbox.py", line 78, in run
    return func()
  File "/home/michael/.local/lib/python2.7/site-packages/setuptools/sandbox.py", line 32, in <lambda>
    {'__file__':setup_script, '__name__':'__main__'}
  File "setup.py", line 3, in <module>
ImportError: No module named numpy
michael@michael-laptop-ubuntu:~/rubyWorkSpace/pymcs$ python
Python 2.7.3 (default, Aug  1 2012, 05:16:07) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> exit

#PythonPath
Python 2.7.3 (default, Aug  1 2012, 05:16:07) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> from pprint import pprint as pp
>>> pp(sys.path)
['',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-linux2',
 '/usr/lib/python2.7/lib-tk',
 '/usr/lib/python2.7/lib-old',
 '/usr/lib/python2.7/lib-dynload',
 '/home/michael/.local/lib/python2.7/site-packages',
 '/home/michael/.local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info',
 '/usr/local/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages/PIL',
 '/usr/lib/python2.7/dist-packages/gst-0.10',
 '/usr/lib/python2.7/dist-packages/gtk-2.0',
 '/usr/lib/pymodules/python2.7',
 '/usr/lib/python2.7/dist-packages/ubuntu-sso-client',
 '/usr/lib/python2.7/dist-packages/ubuntuone-client',
 '/usr/lib/python2.7/dist-packages/ubuntuone-control-panel',
 '/usr/lib/python2.7/dist-packages/ubuntuone-couch',
 '/usr/lib/python2.7/dist-packages/ubuntuone-installer',
 '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol']


michael@michael-laptop-ubuntu:/lib$ python -c "import numpy; print numpy.__file__"
/usr/lib/python2.7/dist-packages/numpy/__init__.pyc

When I try to fix error like ekhumoro said :

michael@michael-laptop-ubuntu:~/rubyWorkSpace/pymcs$ sudo apt-get install python-setuptools
[sudo] password for michael: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python-setuptools is already the newest version.
python-setuptools set to manually installed.
The following packages were automatically installed and are no longer required:
  language-pack-zh-hans language-pack-kde-zh-hans kde-l10n-engb kde-l10n-zhcn
  language-pack-zh-hans-base language-pack-kde-zh-hans-base
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
michael@michael-laptop-ubuntu:~/rubyWorkSpace/pymcs$ /usr/bin/easy_install --user qimage2ndarray
Searching for qimage2ndarray
Reading http://pypi.python.org/simple/qimage2ndarray/
Reading http://kogs-www.informatik.uni-hamburg.de/~meine/software/qimage2ndarray
Reading http://kogs-www.informatik.uni-hamburg.de/~meine/software/qimage2ndarray/dist
Best match: qimage2ndarray 1.0
Downloading http://pypi.python.org/packages/source/q/qimage2ndarray/qimage2ndarray-1.0.zip#md5=5e79e1b45b87aa8e18490162adcce8e4
Processing qimage2ndarray-1.0.zip
Running qimage2ndarray-1.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-WlOZgX/qimage2ndarray-1.0/egg-dist-tmp-YImfzM
sip: Deprecation warning: qimageview.sip:2: %Module version number should be specified using the 'version' argument
sip: Unable to find file "QtGui/QtGuimod.sip"
error: Setup script exited with error: command '/usr/bin/sip' failed with exit status 1
michael@michael-laptop-ubuntu:~/rubyWorkSpace/pymcs$ sudo /usr/bin/easy_install qimage2ndarray
Searching for qimage2ndarray
Reading http://pypi.python.org/simple/qimage2ndarray/
Reading http://kogs-www.informatik.uni-hamburg.de/~meine/software/qimage2ndarray
Reading http://kogs-www.informatik.uni-hamburg.de/~meine/software/qimage2ndarray/dist
Best match: qimage2ndarray 1.0
Downloading http://pypi.python.org/packages/source/q/qimage2ndarray/qimage2ndarray-1.0.zip#md5=5e79e1b45b87aa8e18490162adcce8e4
Processing qimage2ndarray-1.0.zip
Running qimage2ndarray-1.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-cVFRpr/qimage2ndarray-1.0/egg-dist-tmp-Dll6jK
sip: Deprecation warning: qimageview.sip:2: %Module version number should be specified using the 'version' argument
sip: Unable to find file "QtGui/QtGuimod.sip"
error: Setup script exited with error: command '/usr/bin/sip' failed with exit status 1
michael@michael-laptop-ubuntu:~/rubyWorkSpace/pymcs$ 

I don’t understand this error because obviously import numpy works…

If anyone knows an other way to convert numpy array to QImage it could be great.
Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T03:32:14+00:00Added an answer on June 11, 2026 at 3:32 am

    The traceback shows that you are trying to install the package using the easy_install installed under the USER_BASE directory (~/.local/bin/easy_install).

    This is in turn using the python installed under /opt/ActivePython-2.7, which presumably doesn’t have the numpy package installed.

    However, it appears that your system python (/usr/lib/python2.7), does have the numpy package installed.

    So to fix the error, first install the ubuntu package which includes easy_install:

    sudo apt-get install python-setuptools
    

    And then do either:

    /usr/bin/easy_install --user qimage2ndarray
    

    to install qimage2ndarray to your USER_SITE directory, or:

    sudo /usr/bin/easy_install qimage2ndarray
    

    to install it so that it is available system-wide.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

need to convert an xml file having a tag(dynamicVariable) that has an attribute(name).This xml
I need convert a String to a decimal in C#, but this string have
I am in a situation that needs be solve with this way; need convert
I need convert this array data = [ #SHO 0x56, 0x0d, #CMD 0x1, 0x00,
I Need Convert This Code To .net (C# or VB.net) Please Help Me For
I need to convert values like 1393443048683555715 to HEX. But, first of all, i
I need to convert a StringBuffer Array to String Array for sorting. Is there
I need to convert the video into png images. I did that using ffmepg.
I searched a lot but nothing helped me :( Suppose I need convert 12.090.129.019.201.920.192.091.029.102.901.920.192.019.201.920
I create a string: myOption = "{val1:'text1', val2:'text2'...}" I need convert this string into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.