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

Icons and buttons not visible after installing Orange 3.3.7 on Ubuntu 16.04 with Anaconda 3.x #1418

Closed
brylie opened this issue Jul 6, 2016 · 25 comments

Comments

@brylie
Copy link
Contributor

brylie commented Jul 6, 2016

After installing Orange 3.3.7 on Ubuntu 16.04, the user interface icons and buttons fail to render correctly.

Orange version

Orange 3.3.7

Expected bahavior

Icons and buttons would render.

Actual behavior

Icons and buttons do not render

Steps to reproduce the behavior

On Ubuntu 16.04 with Anaconda distribution 3.x

  1. follow installation instructions
  2. launch Orange
  3. load sample project

Additional info (worksheets, data, screenshots, ...)

screenshot from 2016-07-05 15-43-02

Environment

  • Ubuntu 16.04
  • Orange 3.3.7
  • Anaconda 3.x
  • Python 3.5
  • libqt4-svg 4:4.8.7+dfsg-5ubuntu2
@brylie
Copy link
Contributor Author

brylie commented Jul 6, 2016

Original issue was in wrong repository: biolab/orange2#46

@ales-erjavec
Copy link
Contributor

ales-erjavec commented Jul 6, 2016

This is probably the same problem as: https://stackoverflow.com/questions/34629635/orange-canvas-does-not-show-any-icon/ but manifested on Linux.

Are you using Anaconda provided PyQt4? If so are you running anaconda python in the root or a newly created conda environment?

Can you please run the following in bash shell with the correct python on $PATH

python - <<EOF
import os
import PyQt4
from PyQt4.QtGui import QImageReader, QApplication
print("PyQt4 installed in", os.path.dirname(PyQt4.__file__))
print("Qt4 library paths", QApplication.libraryPaths())
print([bytes(f).decode("ascii") for f in QImageReader.supportedImageFormats()])
EOF

@brylie
Copy link
Contributor Author

brylie commented Jul 6, 2016

>>> print("PyQt4 installed in", os.path.dirname(PyQt4.__file__))
PyQt4 installed in /home/brylie/anaconda3/lib/python3.5/site-packages/PyQt4
>>> print("Qt4 library paths", QApplication.libraryPaths())
Qt4 library paths []
>>> print([bytes(f).decode("ascii") for f in QImageReader.supportedImageFormats()])
['bmp', 'pbm', 'pgm', 'png', 'ppm', 'xbm', 'xpm']

@brylie
Copy link
Contributor Author

brylie commented Jul 6, 2016

I installed Anaconda as a normal user in my home directory.

@brylie
Copy link
Contributor Author

brylie commented Jul 6, 2016

There is an upstream issue related to the missing SVG format:

@brylie brylie changed the title Icons and buttons not visible after installing Orange 3.3.7 on Ubuntu 16.04 Icons and buttons not visible after installing Orange 3.3.7 on Ubuntu 16.04 with Anaconda 3.x Jul 6, 2016
@brylie
Copy link
Contributor Author

brylie commented Jul 6, 2016

I added a note to the upstream issue.

@ajdapretnar
Copy link
Contributor

I had people reporting the same issue for OSX (with Anaconda). Works well on Windows.

@brylie
Copy link
Contributor Author

brylie commented Jul 7, 2016

I looked under the anaconda folder in my home directory. I found the following:

  • ~/anaconda3/lib/qt4/plugins/iconengines
    • libqsvgicon.so
  • ~/anaconda3/lib/qt4/plugins/imageformats
    • libqgif.so
    • libqjpeg.so
    • libqsvg.so
    • libqtiff.so
    • libqico.so
    • libqmng.so
    • libqtga.so

@brylie
Copy link
Contributor Author

brylie commented Jul 7, 2016

It seems like the SVG libraries are included as imageformats and iconengines. Is there another folder I should check?

@astaric
Copy link
Member

astaric commented Jul 7, 2016

Whan command do you use to run orange?

python -m Orange.canvas?

If so, please check that there is a qt.conf file in the folder with the python executable and that its entries point to the qt install. I am using anaconda 4.1.6 on OSX, which created a correct config file, but I had to move it a bit to see the icons (i had to move it from anaconda/bin to anaconda/python.app/contents/resources).

@brylie
Copy link
Contributor Author

brylie commented Jul 7, 2016

I am using python -m Orange.canvas e.g. from my home folder. In what folder should I run the command? I will look for the qt.conf file.

@brylie
Copy link
Contributor Author

brylie commented Jul 7, 2016

I have three files named qt.conf:

  • ~/anaconda3/pkgs/qt-4.8.7-3/info/recipe/qt.conf
  • ~/anaconda3/pkgs/qt-4.8.7-3/bin/qt.conf
  • ~/anaconda3/bin/qt.conf

@brylie
Copy link
Contributor Author

brylie commented Jul 7, 2016

I tried running python -m Orange.canvas from within the ~/anaconda3/bin/ folder. The icons still do not render.

@astaric
Copy link
Member

astaric commented Jul 7, 2016

I'll try to reproduce it on a Ubuntu 16.04 virtual machine.Can you tell me which version of conda are you using (conda --version), so I can make sure I am testing on the same configuration?

@brylie
Copy link
Contributor Author

brylie commented Jul 7, 2016

conda 4.1.4

@astaric
Copy link
Member

astaric commented Jul 7, 2016

I have installed conda 4.1.6 into a fresh Unbuntu 16.04 virtual machine. It created ~/anaconda/bin/qt.conf with the following content:

[Paths]
Prefix = /home/x/anaconda3/lib/qt4
Binaries = /home/x/anaconda3/bin
Libraries = /home/x/anaconda3/lib
Headers = /home/x/anaconda3/include/qt4

If I run a slightly modified script ales posted above (I have added one import and the app = ... line):

python - <<EOF
import os
import PyQt4
from PyQt4.QtCore import QCoreApplication
from PyQt4.QtGui import QImageReader, QApplication
app = QCoreApplication([])
print("PyQt4 installed in", os.path.dirname(PyQt4.__file__))
print("Qt4 library paths", QApplication.libraryPaths())
print([bytes(f).decode("ascii") for f in QImageReader.supportedImageFormats()])
EOF

it lists svg

PyQt4 installed in /home/x/anaconda3/lib/python3.5/site-packages/PyQt4
Qt4 library paths ['/home/x/anaconda3/lib/qt4/plugins', '/home/x/anaconda3/bin']
['bmp', 'gif', 'ico', 'jpeg', 'jpg', 'mng', 'pbm', 'pgm', 'png', 'ppm', 'svg', 'svgz', 'tga', 'tif', 'tiff', 'xbm', 'xpm']

@brylie
Copy link
Contributor Author

brylie commented Jul 7, 2016

Same here:

['bmp', 'gif', 'ico', 'jpeg', 'jpg', 'mng', 'pbm', 'pgm', 'png', 'ppm', 'svg', 'svgz', 'tga', 'tif', 'tiff', 'xbm', 'xpm']

@brylie
Copy link
Contributor Author

brylie commented Jul 7, 2016

@astaric, do your icons render?

@astaric
Copy link
Member

astaric commented Jul 7, 2016

They do.

I did not follow the installation guide though, since all the requirements have already been installed by anaconda. What I did after installing anaconda was just

conda install orange3
conda install joblib
conda uninstall orange3

(I used conda to install all orange3 requirements, but then uninstall the outdated orange3 package, as I will install the latest version in the next step)

git clone https://github.com/biolab/orange3
cd orange3
python setup.py install

Then I ran

python -m Orange.canvas

And got a proper canvas with icons.

@astaric
Copy link
Member

astaric commented Jul 8, 2016

Ok, I have managed to reproduce the problem, and found a way to fix it :)

Remove the orange3env folder that was created by the installation script. Then install orange3 with:

conda install orange3
pip install -U orange3

And you should have a working orange canvas with icons.

I will update the installation instructions on the website to give specific instructions for anaconda users.

@brylie
Copy link
Contributor Author

brylie commented Jul 8, 2016

Yay! thanks @astaric :-)

This hopefully gets us closer to simply having a menu item to click when launching Orange ;-)

@brylie
Copy link
Contributor Author

brylie commented Jul 8, 2016

For what it's worth, I was able to 'pin' Orange to my launcher menu after launching it the first time from terminal. However, the pinned icon does not work :-(

@brylie
Copy link
Contributor Author

brylie commented Jul 8, 2016

I opened a feature request for an application launcher on GNU/Linux (#1426).

@astaric
Copy link
Member

astaric commented Jul 11, 2016

The updated instructions should result in a working canvas, so I am closing this issue.

@astaric astaric closed this as completed Jul 11, 2016
@eparimbelli
Copy link

eparimbelli commented Oct 13, 2016

It's still not working for me also following the updated instructions (ubuntu 14.04 though)
freshly installed anaconda 4.2.9

conda install orange3
pip install -U orange3

python -m Orange.canvas >> results in a canvas with no icon displayed

I'm missing the svg support though apparently... don't know how since conda fetched the correct qt4 for me (also asked to downgrade from qt5 to be compatible with orange when I ran conda install orange):

PyQt4 installed in /home/enea/anaconda3/lib/python3.5/site-packages/PyQt4
Qt4 library paths ['/home/enea/anaconda3/plugins', '/home/enea/anaconda3/bin']
['bmp', 'pbm', 'pgm', 'png', 'ppm', 'xbm', 'xpm']

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