chipmuenk / pyfda

Python Filter Design Analysis Tool
http://chipmuenk.github.io/
MIT License
644 stars 94 forks source link

pyqt conda installation works (contradicts install instructions) #167

Closed ctrl-tom closed 4 years ago

ctrl-tom commented 4 years ago

The README says:

PyQt5 is a requirement for pyfda but cannot easily / safely be installed via conda (if you know how to, please tell me).

I was able to install pyfda just fine on a Mac in a fresh conda env using conda-forge's pyqt:

$ conda create -n pyfda-env
$ conda activate pyfda-env
$ conda config --show channels
channels:
  - conda-forge
  - defaults
$ conda install pyqt chipmuenk::pyfda -y
$ pyfdax # [works]

This installed pyqt 5.12.3, and pyfda 0.2.1. I could then launch the tool by running pyfdax. I am running conda 4.8.2, which does not 'stack' envs with the base env. I do not have pyqt installed in base, or system-wide.

I'm attaching the output of conda list and conda info below, in case that's helpful in diagnosing this 'un-bug':


$ conda list
# packages in environment at /Users/X/conda/envs/pyfda:
#
# Name                    Version                   Build  Channel
ca-certificates           2019.11.28           hecc5488_0    conda-forge
certifi                   2019.11.28               py38_0    conda-forge
colorama                  0.4.3                      py_0    conda-forge
cycler                    0.10.0                     py_2    conda-forge
dbus                      1.13.6               h2f22bb5_0    conda-forge
docutils                  0.16                     py38_0    conda-forge
expat                     2.2.5             h4a8c4bd_1004    conda-forge
freetype                  2.10.0               h24853df_1    conda-forge
gettext                   0.19.8.1          h46ab8bc_1002    conda-forge
glib                      2.58.3          py38h577aef8_1002    conda-forge
icu                       64.2                 h6de7cb9_1    conda-forge
jpeg                      9c                h1de35cc_1001    conda-forge
kiwisolver                1.1.0            py38ha1b3eb9_0    conda-forge
libblas                   3.8.0               14_openblas    conda-forge
libcblas                  3.8.0               14_openblas    conda-forge
libclang                  8.0.1                h770b8ee_1    conda-forge
libcxx                    9.0.1                         1    conda-forge
libffi                    3.2.1             h6de7cb9_1006    conda-forge
libgfortran               4.0.0                         2    conda-forge
libiconv                  1.15              h01d97ff_1005    conda-forge
liblapack                 3.8.0               14_openblas    conda-forge
libllvm8                  8.0.1                h770b8ee_0    conda-forge
libopenblas               0.3.7                h3d69b6c_7    conda-forge
libpng                    1.6.37               h2573ce8_0    conda-forge
llvm-openmp               9.0.1                h28b9765_2    conda-forge
matplotlib                3.1.2                    py38_1    conda-forge
matplotlib-base           3.1.2            py38h11da6c2_1    conda-forge
migen                     0.9.2                      py_0    chipmuenk
ncurses                   6.1               h0a44026_1002    conda-forge
nspr                      4.20              h0a44026_1000    conda-forge
nss                       3.47                 hc0980d9_0    conda-forge
numpy                     1.16.5           py38hde6bac1_0    conda-forge
openssl                   1.1.1d               h0b31af3_0    conda-forge
pcre                      8.43                 h4a8c4bd_0    conda-forge
pip                       20.0.2                   py38_0    conda-forge
pyfda                     0.2.1              pyh39e3cac_0    chipmuenk
pyparsing                 2.4.6                      py_0    conda-forge
pyqt                      5.12.3           py38he22c54c_1    conda-forge
pyqt5-sip                 4.19.18                  pypi_0    pypi
pyqtwebengine             5.12.1                   pypi_0    pypi
python                    3.8.1                h5c2c468_1    conda-forge
python-dateutil           2.8.1                      py_0    conda-forge
qt                        5.12.5               h1b46049_0    conda-forge
readline                  8.0                  hcfe32e1_0    conda-forge
scipy                     1.4.1            py38h82752d6_0    conda-forge
setuptools                45.1.0                   py38_0    conda-forge
six                       1.14.0                   py38_0    conda-forge
sqlite                    3.30.1               h93121df_0    conda-forge
tk                        8.6.10               hbbe82c9_0    conda-forge
tornado                   6.0.3            py38h0b31af3_0    conda-forge
wheel                     0.33.6                   py38_0    conda-forge
xz                        5.2.4             h1de35cc_1001    conda-forge
zlib                      1.2.11            h0b31af3_1006    conda-forge

$ conda info

     active environment : pyfda
    active env location : /Users/X/conda/envs/pyfda
            shell level : 2
       user config file : /Users/X/.condarc
 populated config files : /Users/X/.condarc
          conda version : 4.8.2
    conda-build version : not installed
         python version : 3.7.6.final.0
       virtual packages : __osx=10.15.2
       base environment : /Users/X/conda  (writable)
           channel URLs : https://conda.anaconda.org/conda-forge/osx-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/osx-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/osx-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /Users/X/conda/pkgs
                          /Users/X/.conda/pkgs
       envs directories : /Users/X/conda/envs
                          /Users/X/.conda/envs
               platform : osx-64
             user-agent : conda/4.8.2 requests/2.22.0 CPython/3.7.6 Darwin/19.2.0 OSX/10.15.2
                UID:GID : 501:20
             netrc file : None
           offline mode : False
chipmuenk commented 4 years ago

Thanx for the feedback! You're right, the README is not very clear on that point, it says:

PyQt5 is a requirement for pyfda but cannot easily / safely be installed via conda (if you know how to, please tell me). It has to be installed manually either system wide via pip installpyqt5 or sytem resp. environment wide via conda install pyqt . If you have both installed, you're in trouble

What I meant is that pyqt is not like an ordinary requirement that can be installed automatically together with e.g. pyfda, it has to be installed separately on your own risk. AFAIK, the problem lies in the different names for conda (the pyqt wrapper) and pip (pyqt5) which may cause a double installation of PyQt5.

You installed pyqt on a clean system which works fine. The trouble starts if you do conda install pyqt over an existing version of `PyQt5 (installed by pip).

chipmuenk commented 4 years ago

I have updated the README, hopefully it is clearer now.

ctrl-tom commented 4 years ago

Yes it is clearer, thanks!

However in two places in the README you refer to 'resp.', and I don't know what that abbreviation means:

https://github.com/chipmuenk/pyfda/blob/a1cb0795a0217f639deef817b16c185c023667d9/README.md#L51 https://github.com/chipmuenk/pyfda/blob/a1cb0795a0217f639deef817b16c185c023667d9/README.md#L93-L97

Thanks for a wonderful tool BTW! 🥇

chipmuenk commented 4 years ago

Thanks for the Kudos! I meant "respectively" but I just learned that I stepped into a typical trap for ESL writers (English as a Second Language, had to look up that TLA (three letter acronym :stuck_out_tongue_winking_eye: ) as well) ... I'll fix it :smile:

https://en.wiktionary.org/wiki/resp.