hyperspy / hyperspyUI

A user interface for the hyperspy package. https://hyperspy.org/hyperspyUI
GNU General Public License v3.0
25 stars 15 forks source link

During the installation of hyperspyUI, pywin32 cannot be updated #159

Closed wcdyang closed 5 years ago

wcdyang commented 6 years ago

Hello all,

I ran into an issue during the installation of hyperspyUI using pip install hyperspyui. The error says:

Cannot uninstall 'pywin32'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

The version is pywin32 220. I originally thought this might be caused by the Anaconda2 that I also had in the system. However, after uninstalling the entire Anaconda2 package, the same problem still exists. I understand that this may be a pywin32 issue but not a hyperspyUI problem. But I hope somebody here, who may have had the same issue in the past, can provide some thoughts and solutions.

Many thanks ahead for any comments.

jat255 commented 6 years ago

Can you post the output of conda list and pip list from your hyperspy environment? I run on Windows as well, and have not seen this error before.

wcdyang commented 6 years ago

@jat255 Here we go. Thanks for the prompt response. conda list

_license                  1.1                      py36_1
alabaster                 0.7.9                    py36_0
anaconda-client           1.6.0                    py36_0
anaconda-project          0.4.1                    py36_0
astroid                   1.4.9                    py36_0
astropy                   1.3                 np111py36_0
autopep8                  1.3.5                     <pip>
babel                     2.3.4                    py36_0
backcall                  0.1.0                      py_0    conda-forge
backports                 1.0                      py36_0
beautifulsoup4            4.5.3                    py36_0
bitarray                  0.8.1                    py36_1
blaze                     0.10.1                   py36_0
blosc                     1.14.4               h6538335_0    conda-forge
bokeh                     0.12.4                   py36_0
boto                      2.45.0                   py36_0
bottleneck                1.2.0               np111py36_0
bzip2                     1.0.6                    vc14_1  [vc14]  conda-forge
ca-certificates           2018.4.16                     0    conda-forge
cffi                      1.9.1                    py36_0
chardet                   2.3.0                    py36_0
chest                     0.2.3                    py36_0
click                     6.7                      py36_0
cloudpickle               0.2.2                    py36_0
clyent                    1.2.2                    py36_0
colorama                  0.3.7                    py36_0
comtypes                  1.1.2                    py36_0
configobj                 5.0.6                    py36_0
console_shortcut          0.1.1                    py36_1
contextlib2               0.5.4                    py36_0
cryptography              1.7.1                    py36_0
curl                      7.60.0                   vc14_0  [vc14]  conda-forge
cycler                    0.10.0                   py36_0
cython                    0.25.2                   py36_0
cytoolz                   0.8.2                    py36_0
dask                      0.18.2                     py_0    conda-forge
dask-core                 0.18.2                     py_0    conda-forge
datashape                 0.5.4                    py36_0
decorator                 4.0.11                   py36_0
dill                      0.2.5                    py36_0
distributed               1.22.1                   py36_0    conda-forge
docutils                  0.13.1                   py36_0
entrypoints               0.2.2                    py36_0
et_xmlfile                1.0.1                    py36_0
fastcache                 1.0.2                    py36_1
flask                     0.12                     py36_0
flask-cors                3.0.2                    py36_0
freetype                  2.8.1                    vc14_0  [vc14]  conda-forge
future                    0.16.0                    <pip>
get_terminal_size         1.0.0                    py36_0
gevent                    1.2.1                    py36_0
greenlet                  0.4.11                   py36_0
h5py                      2.8.0            py36hb24199d_1    conda-forge
hdf5                      1.10.2                   vc14_0  [vc14]  conda-forge
heapdict                  1.0.0                    py36_1
hyperspy                  1.3.2            py36hfa6e2cd_0    conda-forge
hyperspy-gui-ipywidgets   1.0.0                    py36_0    conda-forge
hyperspy-gui-traitsui     1.0.6                    py36_0    conda-forge
icc_rt                    2017.0.4             h97af966_0    anaconda
icu                       58.2                     vc14_0  [vc14]  conda-forge
idna                      2.2                      py36_0
imageio                   2.2.0                    py36_0    conda-forge
imagesize                 0.7.1                    py36_0
ipykernel                 4.5.2                    py36_0
ipyparallel               6.0.1                    py36_0    conda-forge
ipython                   6.5.0                    py36_0    conda-forge
ipython_genutils          0.1.0                    py36_0
ipywidgets                7.0.0                    py36_1    conda-forge
isort                     4.2.5                    py36_0
itsdangerous              0.24                     py36_0
jdcal                     1.3                      py36_0
jedi                      0.12.1                   py36_0    conda-forge
jinja2                    2.9.4                    py36_0
jpeg                      9b                       vc14_2  [vc14]  conda-forge
jsonschema                2.5.1                    py36_0
jupyter                   1.0.0                    py36_3
jupyter_client            4.4.0                    py36_0
jupyter_console           5.0.0                    py36_0
jupyter_core              4.2.1                    py36_0
kiwisolver                1.0.1                    py36_1    conda-forge
krb5                      1.14.6                   vc14_0  [vc14]  conda-forge
lazy-object-proxy         1.2.2                    py36_0
libcurl                   7.61.0               h7602738_0    anaconda
libiconv                  1.14                     vc14_4  [vc14]  conda-forge
libpng                    1.6.34                   vc14_0  [vc14]  conda-forge
libssh2                   1.8.0                    vc14_2  [vc14]  conda-forge
libtiff                   4.0.9                    vc14_0  [vc14]  conda-forge
libwebp                   0.5.2                    vc14_7  [vc14]  conda-forge
libxml2                   2.9.5                    vc14_1  [vc14]  conda-forge
link-traits               1.0.2                    py36_0    conda-forge
llvmlite                  0.15.0                   py36_0
locket                    0.2.0                    py36_1
lxml                      3.7.2                    py36_0
markupsafe                0.23                     py36_2
matplotlib                2.2.2                     <pip>
matplotlib                2.2.2                    py36_1    conda-forge
menuinst                  1.4.4                    py36_0
mistune                   0.7.3                    py36_0
mkl                       2017.0.1                      0
mkl-service               1.1.2                    py36_3
mpmath                    0.19                     py36_1
msgpack-python            0.4.8                    py36_0    conda-forge
multipledispatch          0.4.9                    py36_0
natsort                   5.0.2                    py36_0    conda-forge
nbconvert                 4.2.0                    py36_0
nbformat                  4.2.0                    py36_0
networkx                  1.11                     py36_0
nltk                      3.2.2                    py36_0
nose                      1.3.7                    py36_1
notebook                  5.1.0                    py36_0    conda-forge
numba                     0.30.1              np111py36_0
numexpr                   2.6.1               np111py36_2
numpy                     1.11.3                   py36_0
numpydoc                  0.6.0                    py36_0
odo                       0.5.0                    py36_1
olefile                   0.44                     py36_0    conda-forge
opencv                    3.2.0             np111py36_203    conda-forge
openpyxl                  2.4.1                    py36_0
openssl                   1.0.2o                   vc14_0  [vc14]  conda-forge
pandas                    0.19.2              np111py36_1
parso                     0.3.1                      py_0    conda-forge
partd                     0.3.8                      py_1    conda-forge
path.py                   10.0                     py36_0
pathlib2                  2.2.0                    py36_0
patsy                     0.4.1                    py36_0
pep8                      1.7.0                    py36_0
pickleshare               0.7.4                    py36_0
pillow                    5.2.0                    py36_0    conda-forge
pint                      0.8.1                    py36_0    conda-forge
pip                       18.0                      <pip>
pip                       18.0                     py36_1    conda-forge
ply                       3.9                      py36_0
prompt_toolkit            1.0.9                    py36_0
psutil                    5.0.1                    py36_0
py                        1.4.32                   py36_0
pyasn1                    0.1.9                    py36_0
pycodestyle               2.4.0                     <pip>
pycosat                   0.6.1                    py36_1
pycparser                 2.17                     py36_0
pycrypto                  2.6.1                    py36_5
pycurl                    7.43.0.2         py36h74b6da3_0    anaconda
pyface                    6.0.0                      py_1    conda-forge
pyflakes                  1.5.0                    py36_0
pygments                  2.1.3                    py36_0
pylint                    1.6.4                    py36_1
pyopenssl                 16.2.0                   py36_0
pyparsing                 2.1.4                    py36_0
pyqode.core               2.11.0                    <pip>
pyqode.python             2.10.0                    <pip>
pyqode.qt                 2.10.0                    <pip>
pyqt                      5.6.0            py36h764d66f_6    conda-forge
pyreadline                2.1                      py36_0    conda-forge
pytables                  3.4.4            py36h7e76658_1    conda-forge
pytest                    3.0.5                    py36_0
python                    3.6.6                hea74fb7_0    anaconda
python-dateutil           2.6.0                    py36_0
python-qt-binding         0.3.4                     <pip>
pytz                      2016.10                  py36_0
pywavelets                0.5.2               np111py36_0    conda-forge
pywin32                   220                      py36_2
pyyaml                    3.12                     py36_0
pyzmq                     17.0.0           py36hfa6e2cd_0    anaconda
qt                        5.6.2                    vc14_1  [vc14]  conda-forge
qtawesome                 0.4.3                    py36_0
qtconsole                 4.3.1                    py36_0    conda-forge
qtpy                      1.2.1                    py36_0
requests                  2.12.4                   py36_0
rope                      0.9.4                    py36_1
ruamel_yaml               0.11.14                  py36_1
scikit-image              0.13.0                   py36_1    conda-forge
scikit-learn              0.18.1              np111py36_1
scipy                     0.18.1              np111py36_1
seaborn                   0.7.1                    py36_0
setuptools                27.2.0                   py36_1
simplegeneric             0.8.1                    py36_1
singledispatch            3.4.0.3                  py36_0
sip                       4.18                     py36_0
six                       1.10.0                   py36_0
snowballstemmer           1.2.1                    py36_0
sockjs-tornado            1.0.3                    py36_0
sortedcontainers          1.5.7                    py36_0    conda-forge
sphinx                    1.5.1                    py36_0
spyder                    3.1.2                    py36_0
sqlalchemy                1.1.5                    py36_0
sqlite                    3.22.0                   vc14_0  [vc14]  conda-forge
statsmodels               0.6.1               np111py36_1
sympy                     1.0                      py36_0
tblib                     1.3.2                    py36_0    conda-forge
tk                        8.6.8                    vc14_0  [vc14]  conda-forge
toolz                     0.8.2                    py36_0
tornado                   4.5.3                     <pip>
tornado                   5.1              py36hfa6e2cd_1    conda-forge
tqdm                      4.11.2                   py36_0    conda-forge
traitlets                 4.3.1                    py36_0
traits                    4.6.0                    py36_1    conda-forge
traitsui                  6.0.0                      py_1    conda-forge
unicodecsv                0.14.1                   py36_0
vc                        14                            0    conda-forge
vs2015_runtime            15.5.2                        3    anaconda
wcwidth                   0.1.7                    py36_0
werkzeug                  0.11.15                  py36_0
wheel                     0.29.0                   py36_0
widgetsnbextension        3.0.2                    py36_0    conda-forge
win_unicode_console       0.5                      py36_0
wrapt                     1.10.8                   py36_0
xlrd                      1.0.0                    py36_0
xlsxwriter                0.9.6                    py36_0
xlwings                   0.10.2                   py36_0
xlwt                      1.2.0                    py36_0
zict                      0.1.3                      py_0    conda-forge
zlib                      1.2.11                   vc14_0  [vc14]  conda-forge

pip list

Package                            Version
---------------------------------- -----------
alabaster                          0.7.9
anaconda-client                    1.6.0
anaconda-project                   0.4.1
astroid                            1.4.9
astropy                            1.3
autopep8                           1.3.5
Babel                              2.3.4
backcall                           0.1.0
backports.shutil-get-terminal-size 1.0.0
beautifulsoup4                     4.5.3
bitarray                           0.8.1
blaze                              0.10.1
bokeh                              0.12.4
boto                               2.45.0
Bottleneck                         1.2.0
cffi                               1.9.1
chardet                            2.3.0
chest                              0.2.3
click                              6.7
cloudpickle                        0.2.2
clyent                             1.2.2
colorama                           0.3.7
comtypes                           1.1.2
configobj                          5.0.6
contextlib2                        0.5.4
cryptography                       1.7.1
cycler                             0.10.0
Cython                             0.25.2
cytoolz                            0.8.2
dask                               0.18.2
datashape                          0.5.4
decorator                          4.0.11
dill                               0.2.5
distributed                        1.22.1
docutils                           0.13.1
et-xmlfile                         1.0.1
fastcache                          1.0.2
Flask                              0.12
Flask-Cors                         3.0.2
future                             0.16.0
gevent                             1.2.1
greenlet                           0.4.11
h5py                               2.8.0
HeapDict                           1.0.0
hyperspy                           1.3.2
hyperspy-gui-ipywidgets            1.0.0
hyperspy-gui-traitsui              1.0.6
idna                               2.2
imageio                            2.2.0
imagesize                          0.7.1
ipykernel                          4.5.2
ipyparallel                        6.0.1
ipython                            6.5.0
ipython-genutils                   0.1.0
ipywidgets                         7.0.0
isort                              4.2.5
itsdangerous                       0.24
jdcal                              1.3
jedi                               0.12.1
Jinja2                             2.9.4
jsonschema                         2.5.1
jupyter                            1.0.0
jupyter-client                     4.4.0
jupyter-console                    5.0.0
jupyter-core                       4.2.1
kiwisolver                         1.0.1
lazy-object-proxy                  1.2.2
link-traits                        1.0.2
llvmlite                           0.15.0
locket                             0.2.0
lxml                               3.7.2
MarkupSafe                         0.23
matplotlib                         2.2.2
menuinst                           1.4.4
mistune                            0.7.3
mpmath                             0.19
msgpack-python                     0.4.8
multipledispatch                   0.4.9
natsort                            5.0.2
nbconvert                          4.2.0
nbformat                           4.2.0
networkx                           1.11
nltk                               3.2.2
nose                               1.3.7
notebook                           5.1.0
numba                              0.30.1
numexpr                            2.6.1
numpy                              1.11.3
numpydoc                           0.6.0
odo                                0.5.0
olefile                            0.44
openpyxl                           2.4.1
pandas                             0.19.2
parso                              0.3.1
partd                              0.3.8
path.py                            0.0.0
pathlib2                           2.2.0
patsy                              0.4.1
pep8                               1.7.0
pickleshare                        0.7.4
Pillow                             5.2.0
Pint                               0.8.1
pip                                18.0
ply                                3.9
prompt-toolkit                     1.0.9
psutil                             5.0.1
py                                 1.4.32
pyasn1                             0.1.9
pycodestyle                        2.4.0
pycosat                            0.6.1
pycparser                          2.17
pycrypto                           2.6.1
pycurl                             7.43.0.2
pyface                             6.0.0
pyflakes                           1.5.0
Pygments                           2.1.3
pylint                             1.6.4
pyOpenSSL                          16.2.0
pyparsing                          2.1.4
pyqode.core                        2.11.0
pyqode.python                      2.10.0
pyqode.qt                          2.10.0
pyreadline                         2.1
pytest                             3.0.5
python-dateutil                    2.6.0
python-qt-binding                  0.3.4
pytz                               2016.10
PyWavelets                         0.5.2
pywin32                            220
PyYAML                             3.12
pyzmq                              17.0.0
QtAwesome                          0.4.3
qtconsole                          4.3.1
QtPy                               1.2.1
requests                           2.12.4
rope-py3k                          0.9.4.post1
scikit-image                       0.13.0
scikit-learn                       0.18.1
scipy                              0.18.1
seaborn                            0.7.1
setuptools                         27.2.0
simplegeneric                      0.8.1
singledispatch                     3.4.0.3
six                                1.10.0
snowballstemmer                    1.2.1
sockjs-tornado                     1.0.3
sortedcontainers                   1.5.7
sphinx                             1.5.1
spyder                             3.1.2
SQLAlchemy                         1.1.5
statsmodels                        0.6.1
sympy                              1.0
tables                             3.4.4
tblib                              1.3.2
toolz                              0.8.2
tornado                            4.5.3
tqdm                               4.11.2
traitlets                          4.3.1
traits                             4.6.0
traitsui                           6.0.0
unicodecsv                         0.14.1
wcwidth                            0.1.7
Werkzeug                           0.11.15
wheel                              0.29.0
widgetsnbextension                 3.0.2
win-unicode-console                0.5
wrapt                              1.10.8
xlrd                               1.0.0
XlsxWriter                         0.9.6
xlwings                            0.10.2
xlwt                               1.2.0
zict                               0.1.3
jat255 commented 6 years ago

I'm not sure why you'd be getting that error, unless you installed pywin32 via some other means (python setup install or something). Is this in a new environment?

I see you have duplicate versions (from pip and from conda) of a few packages, such as pip, matplotlib, twisted, etc. that might be causing some interference. If you don't mind, I would recommend creating a new 3.6 conda env, installing hyperspy in that via conda install hyperspy, and then installing HyperspyUI to see if it works. I did that a week or so ago, and everything went okay, so it sounds like an inconsistency in your environment.

vidartf commented 6 years ago

Is this error message ignorable, or is it preventing the install? It can be a bit tricky to deal with. When installing to conda, I think I normally install as many of HyperspyUI's dependencies as possible from conda before running the pip install, but I don't remember much beyond that,

wcdyang commented 6 years ago

@jat255 Yes, a new environment seems to work.

@vidartf It is an error that prevents the installation from preceding. Like what both you and @jat255 suggested, using a clean environment with mostly conda-installed components/libraries solves the version conflict. However, I still cannot find a way to remove or update the pywin32 200 in the troubling environment.

Many thanks for the suggestions.

ericpre commented 6 years ago

In miniconda with appveyor, there is this issue too and in the winpython based hyperspy bundle too... both are using installed using pip. The workaround is to run the installation twice, see the two link above... this is a bit weird! With conda, this could be solved by creating a conda-forge feedstock. It would be a good reason to set it up.

vidartf commented 6 years ago

One or more of the dependencies are pip-only, which is why I never set up a conda forge feedstock. If you want to look into creating feedstocks for the dependencies as well, that should still be viable!

ericpre commented 6 years ago

Ah yes indeed, sorry I missed #132 on this topic.