uvemas/ViTables

Vitables on Windows

Closed this issue · 14 comments

I'm trying to run Vitables from conda-forge on Windows.

I try running it like this:

conda create -n vitables
activate vitables
conda install -c conda-forge vitables
vitables

There is no output at all on the command line

If I run python <condapath>\pkgs\vitables-3.0.0-0\Lib\site-packages\vitables\start.py I can get the GUI up, but get errors stating:

2017-07-07 14:05:28,062 - vitables.h5db.dbstreemodel - INFO - Creating the Query results file...
2017-07-07 14:05:28,620 - vitables.preferences.pluginsloader - ERROR - Failed to load plugin: vitables.plugins.columnorg.columnar_org
2017-07-07 14:05:28,620 - vitables.preferences.pluginsloader - ERROR - The 'PyQt5>=5.5.1' distribution was not found and is required by the application
2017-07-07 14:05:28,647 - vitables.preferences.pluginsloader - ERROR - Failed to load plugin: vitables.plugins.dbstreesort.dbs_tree_sort
2017-07-07 14:05:28,647 - vitables.preferences.pluginsloader - ERROR - The 'PyQt5>=5.5.1' distribution was not found and is required by the application
2017-07-07 14:05:28,666 - vitables.preferences.pluginsloader - ERROR - Failed to load plugin: vitables.plugins.csv.export_csv
2017-07-07 14:05:28,666 - vitables.preferences.pluginsloader - ERROR - The 'PyQt5>=5.5.1' distribution was not found and is required by the application
2017-07-07 14:05:28,686 - vitables.preferences.pluginsloader - ERROR - Failed to load plugin: vitables.plugins.csv.import_csv
2017-07-07 14:05:28,686 - vitables.preferences.pluginsloader - ERROR - The 'PyQt5>=5.5.1' distribution was not found and is required by the application
2017-07-07 14:05:28,708 - vitables.preferences.pluginsloader - ERROR - Failed to load plugin: vitables.plugins.timeseries.time_series
2017-07-07 14:05:28,709 - vitables.preferences.pluginsloader - ERROR - The 'PyQt5>=5.5.1' distribution was not found and is required by the application

I have pyqt 5.6.0 installed via the conda install process so I'm not sure why it's not being picked up

No feedback from OP. I assume the problem is fixed and close the bug.

Ehm, no.
I tried running through your FAQ and removing the line PyQt5 (>=5.5.1) and nothing has changed.

Iep! Hi again. That's strange. Reviewing your post I see you said:

 conda create -n vitables
 activate vitables
 conda install -c conda-forge vitables
 vitables

I don't understand why you execute the first two lines (I'm not an Anaconda user, sorry). AFAIK in order to install the conda package from the Anaconda prompt you only need to do:

(Anaconda3)> conda install -c conda-forge vitables

Then, run vitables with (providing a proper path of course):

(Anaconda3)> C:\Users\vicente\Anaconda3\Script\vitables

And it should run. If it doesn't you can run the start.py (as you did) or try similar workarounds in order to see what's happening.

So far so good. Now, if in my C:\Users\vicente\Anaconda3\pkgs\vitables-3.0.0-0\Lib\site-packages\ViTables-3.0.0-py2.7.egg-info\requires.txt I have the line

PyQt5 (>=5.5.1)

I get exactly the same errors as you when I execute

(Anaconda3) C:\Users\vicente>python .\Anaconda3\pkgs\vitables-3.0.0-0\Lib\site-packages\vitables\start.py

(due to to conflict mentioned in the FAQ). But if I remove that requirement then vitables run with no issues at all.

Are you installing, executing and removing requirements exactly as described above? If so I don't understand what happens :(

If this doesn't help, you can ask your question to the ViTables Users's group. Maybe sombebody there has the solution to your problem. Sorry for not being more helpful.

You can also try to install from sources.

The first two lines are to:

  1. create the conda environment
  2. activate the environment

Activating the environment adds the environment to PATH

(C:\miniconda) C:\Users\bagdon>set path
Path=C:\Program Files\ConEmu\ConEmu\Scripts;C:\Program Files\ConEmu;C:\Program Files\ConEmu\ConEmu;C:\Program Files\Microsoft MPI\Bin\;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Perforce;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\ProgramData\chocolatey\bin;C:\Program Files\Perforce\DVCS\;C:\android;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Perforce;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Users\bagdon\AppData\Local\atom\bin;C:\miniconda\Scripts;C:\Program Files (x86)\Nmap;C:\Tools\apache-maven-3.3.9\bin;c:\Program Files (x86)\Graphviz2.38\bin;C:\selenium_drivers\geckodriver-v0.16.1-win32;C:\Program Files (x86)\Microsoft VS Code\bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

(C:\miniconda) C:\Users\bagdon>activate vitables

(vitables) C:\Users\bagdon>set path
Path=C:\miniconda\envs\vitables;C:\miniconda\envs\vitables\Library\mingw-w64\bin;C:\miniconda\envs\vitables\Library\usr\bin;C:\miniconda\envs\vitables\Library\bin;C:\miniconda\envs\vitables\Scripts;C:\Program Files\ConEmu\ConEmu\Scripts;C:\Program Files\ConEmu;C:\Program Files\ConEmu\ConEmu;C:\Program Files\Microsoft MPI\Bin\;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Perforce;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\ProgramData\chocolatey\bin;C:\Program Files\Perforce\DVCS\;C:\android;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Perforce;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Users\bagdon\AppData\Local\atom\bin;C:\miniconda\Scripts;C:\Program Files (x86)\Nmap;C:\Tools\apache-maven-3.3.9\bin;c:\Program Files (x86)\Graphviz2.38\bin;C:\selenium_drivers\geckodriver-v0.16.1-win32;C:\Program Files (x86)\Microsoft VS Code\bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

After I do this, I expect running vitables to start ViTables, but it does not.
I've tried building the conda package from sources, but I have the same problems.

Thanks a lot for the info about the first two lines.

I've uninstalled ViTables from my Anaconda3 system and I've done a fresh installation following your instructions (first create the environment, then install the package). I've had to explicitely install qtpy. Apart from this, the installation was fine. When running vitables I met the same problems as you. Again, removing the PyQt5 requirement from the C:\Users\vicente\Anaconda3\pkgs\vitables-3.0.0-0\Lib\site-packages\ViTables-3.0.0-py2.7.egg-info\requires.txt file fixed the problem.

I've no more ideas about the root of your problem. As I said before you can ask for help to the ViTables Users Group.

Please, let me know if you find the solution to your problem. That info can be useful for other users. Thanks for your patience and for your report.

OK installing qtpy manually was the missing step.
Not sure why it doesn't get installed automatically...

Looks like it is not included in the run requirements:
https://github.com/conda-forge/vitables-feedstock/blob/master/recipe/meta.yaml
Can we get this added?

Thanks for coming back.

I'm going to create an issue at vitables-feedstock.

It would also be helpful to either:

  1. Have a specific conda.setup.py file that the script calls which removes the PyQt5 install requirement
  2. During the conda build, remove that requirement from setup.py

For 2, it would just be a matter of moving the script from meta.yaml to bld.bat and build.sh with a step to find and remove that string.
This is difficult in batch because of the formatting of the requirements, so if it could be moved to a separate line which could just be deleted with type setup.py | findstr /v PyQt5 > conda.setup.py that would work nicely.

install_requires=['qtpy (>=1.2.1)',
                           'PyQt5 (>=5.5.1)', 
                           'numpy (>=1.4.1)',
                           'numexpr (>=2.0)', 
                           'tables (>=3.0)'],

So the build.bat file would just be

type setup.py | findstr /v PyQt5 > conda.setup.py
%python% conda.setup.py install --single-version-externally-managed --record record.txt
if errorlevel 1 exit 1

As you can now install and a new vitables package has been uploaded to conda-forge (now the recipe includes the qtpy dependecy) I'm closing this bug. I add your latest suggestions to my TODO.

Thanks a lot for your help.

As @wbagdon mentioned, vitables can't be launched either in windows cmd or conda cmd whether removing the line PyQt5 (>=5.5.1) or not if using conda installer, i.e. conda install -c conda-forge vitables.
So, this following works for me.
1/ Uninstall vitables in conda cmd, i.e. pip uninstall vitables.
2/Download windows installer, i.e. ViTables-3.0.0-py2.py3-none-any.whl, then install it in windows cmd
3/Launch in windows cmd, i.e. vitables

Maybe someone can submit a new conda recipe into feedstock, and fix this once and for all...