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

Anaconda 5.3.0 (and older versions) no longer working on Windows 10 #10236

Closed
probit2011 opened this issue Oct 21, 2018 · 34 comments
Closed

Anaconda 5.3.0 (and older versions) no longer working on Windows 10 #10236

probit2011 opened this issue Oct 21, 2018 · 34 comments
Labels

Comments

@probit2011
Copy link

Like many users have reported recently, I have tried to install Anaconda version 5.3.0 on my Windows 10 laptop. Previously, I was using Anaconda version 4.4.0 and it was working OK.

After installation of 5.3.0, all the icons (Anaconda Navigator, Spyder, Jupyter Notebook, Anaconda prompt) appear in the Windows Start menu, but only Anaconda Prompt is accessible. All the others do not execute anything.

I tried: 1- downgrading from Python 3.7 to Python 3.6; 2- uninstalling 5.3.0 and installing 5.2.0; 3- uninstalling 5.2.0 and re-installing my old 4.4.0. Every time, the same result: nothing executes, nothing opens.

I also tried dealing with the error message I obtained by launching anaconda-navigator manually in Anaconda Prompt (see below) by uploading PySide and resolve the Qt bindings problems, as suggested in another post, and nothing works.

Actual Behavior

Anaconda Navigator, Spyder, Jupyter Notebook refuse to execute/open in Windows 10 after installing/re-installing various versions of Anaconda.

Expected Behavior

It should be executing/opening.

Steps to Reproduce

I have described it above.

Anaconda or Miniconda version:

It didn't work for Anaconda 5.3.0, 5.2.0, 4.4.0, all for Windows 64-bit.

Operating System:

Windows 10 Home

conda info

Collected after installing 5.2.0

(base) C:\Users\patrob>conda info

     active environment : base
    active env location : C:\Users\patrob\Anaconda3
            shell level : 1
       user config file : C:\Users\patrob\.condarc
 populated config files : C:\Users\patrob\.condarc
          conda version : 4.5.4
    conda-build version : 3.10.5
         python version : 3.6.5.final.0
       base environment : C:\Users\patrob\Anaconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/win-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/pro/win-64
                          https://repo.anaconda.com/pkgs/pro/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\Users\patrob\Anaconda3\pkgs
                          C:\Users\patrob\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\patrob\Anaconda3\envs
                          C:\Users\patrob\AppData\Local\conda\conda\envs
                          C:\Users\patrob\.conda\envs
               platform : win-64
             user-agent : conda/4.5.4 requests/2.18.4 CPython/3.6.5 Windows/10 Windows/10.0.17134
          administrator : False
             netrc file : None
           offline mode : False
conda list --show-channel-urls

Collected after installing 5.2.0

(base) C:\Users\patrob>conda list --show-channel-urls
# packages in environment at C:\Users\patrob\Anaconda3:
#
# Name                    Version                   Build  Channel
_ipyw_jlab_nb_ext_conf    0.1.0            py36he6757f0_0    defaults
alabaster                 0.7.10           py36hcd07829_0    defaults
anaconda                  5.2.0                    py36_3    defaults
anaconda-client           1.6.14                   py36_0    defaults
anaconda-navigator        1.8.7                    py36_0    defaults
anaconda-project          0.8.2            py36hfad2e28_0    defaults
asn1crypto                0.24.0                   py36_0    defaults
astroid                   1.6.3                    py36_0    defaults
astropy                   3.0.2            py36h452e1ab_1    defaults
attrs                     18.1.0                   py36_0    defaults
babel                     2.5.3                    py36_0    defaults
backcall                  0.1.0                    py36_0    defaults
backports                 1.0              py36h81696a8_1    defaults
backports.shutil_get_terminal_size 1.0.0            py36h79ab834_2    defaults
beautifulsoup4            4.6.0            py36hd4cc5e8_1    defaults
bitarray                  0.8.1            py36hfa6e2cd_1    defaults
bkcharts                  0.2              py36h7e685f7_0    defaults
blas                      1.0                         mkl    defaults
blaze                     0.11.3           py36h8a29ca5_0    defaults
bleach                    2.1.3                    py36_0    defaults
blosc                     1.14.3               he51fdeb_0    defaults
bokeh                     0.12.16                  py36_0    defaults
boto                      2.48.0           py36h1a776d2_1    defaults
bottleneck                1.2.1            py36hd119dfa_0    defaults
bzip2                     1.0.6                hfa6e2cd_5    defaults
ca-certificates           2018.03.07                    0    defaults
certifi                   2018.4.16                py36_0    defaults
cffi                      1.11.5           py36h945400d_0    defaults
chardet                   3.0.4            py36h420ce6e_1    defaults
click                     6.7              py36hec8c647_0    defaults
cloudpickle               0.5.3                    py36_0    defaults
clyent                    1.2.2            py36hb10d595_1    defaults
colorama                  0.3.9            py36h029ae33_0    defaults
comtypes                  1.1.4                    py36_0    defaults
conda                     4.5.4                    py36_0    defaults
conda-build               3.10.5                   py36_0    defaults
conda-env                 2.6.0                h36134e3_1    defaults
conda-verify              2.0.0            py36h065de53_0    defaults
console_shortcut          0.1.1                h6bb2dd7_3    defaults
contextlib2               0.5.5            py36he5d52c0_0    defaults
cryptography              2.2.2            py36hfa6e2cd_0    defaults
curl                      7.60.0               h7602738_0    defaults
cycler                    0.10.0           py36h009560c_0    defaults
cython                    0.28.2           py36hfa6e2cd_0    defaults
cytoolz                   0.9.0.1          py36hfa6e2cd_0    defaults
dask                      0.17.5                   py36_0    defaults
dask-core                 0.17.5                   py36_0    defaults
datashape                 0.5.4            py36h5770b85_0    defaults
decorator                 4.3.0                    py36_0    defaults
distributed               1.21.8                   py36_0    defaults
docutils                  0.14             py36h6012d8f_0    defaults
entrypoints               0.2.3            py36hfd66bb0_2    defaults
et_xmlfile                1.0.1            py36h3d2d736_0    defaults
fastcache                 1.0.2            py36hfa6e2cd_2    defaults
filelock                  3.0.4                    py36_0    defaults
flask                     1.0.2                    py36_1    defaults
flask-cors                3.0.4                    py36_0    defaults
freetype                  2.8                  h51f8f2c_1    defaults
get_terminal_size         1.0.0                h38e98db_0    defaults
gevent                    1.3.0            py36hfa6e2cd_0    defaults
glob2                     0.6              py36hdf76b57_0    defaults
greenlet                  0.4.13           py36hfa6e2cd_0    defaults
h5py                      2.7.1            py36h3bdd7fb_2    defaults
hdf5                      1.10.2               hac2f561_1    defaults
heapdict                  1.0.0                    py36_2    defaults
html5lib                  1.0.1            py36h047fa9f_0    defaults
icc_rt                    2017.0.4             h97af966_0    defaults
icu                       58.2                 ha66f8fd_1    defaults
idna                      2.6              py36h148d497_1    defaults
imageio                   2.3.0                    py36_0    defaults
imagesize                 1.0.0                    py36_0    defaults
intel-openmp              2018.0.0                      8    defaults
ipykernel                 4.8.2                    py36_0    defaults
ipython                   6.4.0                    py36_0    defaults
ipython_genutils          0.2.0            py36h3c5d0ee_0    defaults
ipywidgets                7.2.1                    py36_0    defaults
isort                     4.3.4                    py36_0    defaults
itsdangerous              0.24             py36hb6c5a24_1    defaults
jdcal                     1.4                      py36_0    defaults
jedi                      0.12.0                   py36_1    defaults
jinja2                    2.10             py36h292fed1_0    defaults
jpeg                      9b                   hb83a4c4_2    defaults
jsonschema                2.6.0            py36h7636477_0    defaults
jupyter                   1.0.0                    py36_4    defaults
jupyter_client            5.2.3                    py36_0    defaults
jupyter_console           5.2.0            py36h6d89b47_1    defaults
jupyter_core              4.4.0            py36h56e9d50_0    defaults
jupyterlab                0.32.1                   py36_0    defaults
jupyterlab_launcher       0.10.5                   py36_0    defaults
kiwisolver                1.0.1            py36h12c3424_0    defaults
lazy-object-proxy         1.3.1            py36hd1c21d2_0    defaults
libcurl                   7.60.0               hc4dcbb0_0    defaults
libiconv                  1.15                 h1df5818_7    defaults
libpng                    1.6.34               h79bbb47_0    defaults
libsodium                 1.0.16               h9d3ae62_0    defaults
libssh2                   1.8.0                hd619d38_4    defaults
libtiff                   4.0.9                hb8ad9f9_1    defaults
libxml2                   2.9.8                hadb2253_1    defaults
libxslt                   1.1.32               hf6f1972_0    defaults
llvmlite                  0.23.1           py36hcacf6c6_0    defaults
locket                    0.2.0            py36hfed976d_1    defaults
lxml                      4.2.1            py36heafd4d3_0    defaults
lzo                       2.10                 h6df0209_2    defaults
m2w64-gcc-libgfortran     5.3.0                         6    defaults
m2w64-gcc-libs            5.3.0                         7    defaults
m2w64-gcc-libs-core       5.3.0                         7    defaults
m2w64-gmp                 6.1.0                         2    defaults
m2w64-libwinpthread-git   5.0.0.4634.697f757               2    defaults
markupsafe                1.0              py36h0e26971_1    defaults
matplotlib                2.2.2            py36h153e9ff_1    defaults
mccabe                    0.6.1            py36hb41005a_1    defaults
menuinst                  1.4.14           py36hfa6e2cd_0    defaults
mistune                   0.8.3            py36hfa6e2cd_1    defaults
mkl                       2018.0.2                      1    defaults
mkl-service               1.1.2            py36h57e144c_4    defaults
mkl_fft                   1.0.1            py36h452e1ab_0    defaults
mkl_random                1.0.1            py36h9258bd6_0    defaults
more-itertools            4.1.0                    py36_0    defaults
mpmath                    1.0.0            py36hacc8adf_2    defaults
msgpack-python            0.5.6            py36he980bc4_0    defaults
msys2-conda-epoch         20160418                      1    defaults
multipledispatch          0.5.0                    py36_0    defaults
navigator-updater         0.2.1                    py36_0    defaults
nbconvert                 5.3.1            py36h8dc0fde_0    defaults
nbformat                  4.4.0            py36h3a5bc1b_0    defaults
networkx                  2.1                      py36_0    defaults
nltk                      3.3.0                    py36_0    defaults
nose                      1.3.7            py36h1c3779e_2    defaults
notebook                  5.5.0                    py36_0    defaults
numba                     0.38.0           py36h830ac7b_0    defaults
numexpr                   2.6.5            py36hcd2f87e_0    defaults
numpy                     1.14.3           py36h9fa60d3_1    defaults
numpy-base                1.14.3           py36h555522e_1    defaults
numpydoc                  0.8.0                    py36_0    defaults
odo                       0.5.1            py36h7560279_0    defaults
olefile                   0.45.1                   py36_0    defaults
openpyxl                  2.5.3                    py36_0    defaults
openssl                   1.0.2o               h8ea7d77_0    defaults
packaging                 17.1                     py36_0    defaults
pandas                    0.23.0           py36h830ac7b_0    defaults
pandoc                    1.19.2.1             hb2460c7_1    defaults
pandocfilters             1.4.2            py36h3ef6317_1    defaults
parso                     0.2.0                    py36_0    defaults
partd                     0.3.8            py36hc8e763b_0    defaults
path.py                   11.0.1                   py36_0    defaults
pathlib2                  2.3.2                    py36_0    defaults
patsy                     0.5.0                    py36_0    defaults
pep8                      1.7.1                    py36_0    defaults
pickleshare               0.7.4            py36h9de030f_0    defaults
pillow                    5.1.0            py36h0738816_0    defaults
pip                       10.0.1                   py36_0    defaults
pkginfo                   1.4.2                    py36_1    defaults
pluggy                    0.6.0            py36hc7daf1e_0    defaults
ply                       3.11                     py36_0    defaults
prompt_toolkit            1.0.15           py36h60b8f86_0    defaults
psutil                    5.4.5            py36hfa6e2cd_0    defaults
py                        1.5.3                    py36_0    defaults
pycodestyle               2.4.0                    py36_0    defaults
pycosat                   0.6.3            py36h413d8a4_0    defaults
pycparser                 2.18             py36hd053e01_1    defaults
pycrypto                  2.6.1            py36hfa6e2cd_8    defaults
pycurl                    7.43.0.1         py36h74b6da3_0    defaults
pyflakes                  1.6.0            py36h0b975d6_0    defaults
pygments                  2.2.0            py36hb010967_0    defaults
pylint                    1.8.4                    py36_0    defaults
pyodbc                    4.0.23           py36h6538335_0    defaults
pyopenssl                 18.0.0                   py36_0    defaults
pyparsing                 2.2.0            py36h785a196_1    defaults
pyqt                      5.9.2            py36h1aa27d4_0    defaults
pysocks                   1.6.8                    py36_0    defaults
pytables                  3.4.3            py36he6f6034_1    defaults
pytest                    3.5.1                    py36_0    defaults
pytest-arraydiff          0.2                      py36_0    defaults
pytest-astropy            0.3.0                    py36_0    defaults
pytest-doctestplus        0.1.3                    py36_0    defaults
pytest-openfiles          0.3.0                    py36_0    defaults
pytest-remotedata         0.2.1                    py36_0    defaults
python                    3.6.5                h0c2934d_0    defaults
python-dateutil           2.7.3                    py36_0    defaults
pytz                      2018.4                   py36_0    defaults
pywavelets                0.5.2            py36hc649158_0    defaults
pywin32                   223              py36hfa6e2cd_1    defaults
pywinpty                  0.5.1                    py36_0    defaults
pyyaml                    3.12             py36h1d1928f_1    defaults
pyzmq                     17.0.0           py36hfa6e2cd_1    defaults
qt                        5.9.5            vc14he4a7d60_0  [vc14]  defaults
qtawesome                 0.4.4            py36h5aa48f6_0    defaults
qtconsole                 4.3.1            py36h99a29a9_0    defaults
qtpy                      1.4.1                    py36_0    defaults
requests                  2.18.4           py36h4371aae_1    defaults
rope                      0.10.7           py36had63a69_0    defaults
ruamel_yaml               0.15.35          py36hfa6e2cd_1    defaults
scikit-image              0.13.1           py36hfa6e2cd_1    defaults
scikit-learn              0.19.1           py36h53aea1b_0    defaults
scipy                     1.1.0            py36h672f292_0    defaults
seaborn                   0.8.1            py36h9b69545_0    defaults
send2trash                1.5.0                    py36_0    defaults
setuptools                39.1.0                   py36_0    defaults
simplegeneric             0.8.1                    py36_2    defaults
singledispatch            3.4.0.3          py36h17d0c80_0    defaults
sip                       4.19.8           py36h6538335_0    defaults
six                       1.11.0           py36h4db2310_1    defaults
snappy                    1.1.7                h777316e_3    defaults
snowballstemmer           1.2.1            py36h763602f_0    defaults
sortedcollections         0.6.1                    py36_0    defaults
sortedcontainers          1.5.10                   py36_0    defaults
sphinx                    1.7.4                    py36_0    defaults
sphinxcontrib             1.0              py36hbbac3d2_1    defaults
sphinxcontrib-websupport  1.0.1            py36hb5e5916_1    defaults
spyder                    3.2.8                    py36_0    defaults
sqlalchemy                1.2.7            py36ha85dd04_0    defaults
sqlite                    3.23.1               h35aae40_0    defaults
statsmodels               0.9.0            py36h452e1ab_0    defaults
sympy                     1.1.1            py36h96708e0_0    defaults
tblib                     1.3.2            py36h30f5020_0    defaults
terminado                 0.8.1                    py36_1    defaults
testpath                  0.3.1            py36h2698cfe_0    defaults
tk                        8.6.7                hcb92d03_3    defaults
toolz                     0.9.0                    py36_0    defaults
tornado                   5.0.2                    py36_0    defaults
traitlets                 4.3.2            py36h096827d_0    defaults
typing                    3.6.4                    py36_0    defaults
unicodecsv                0.14.1           py36h6450c06_0    defaults
urllib3                   1.22             py36h276f60a_0    defaults
vc                        14                   h0510ff6_3    defaults
vs2015_runtime            14.0.25123                    3    defaults
wcwidth                   0.1.7            py36h3d5aa90_0    defaults
webencodings              0.5.1            py36h67c50ae_1    defaults
werkzeug                  0.14.1                   py36_0    defaults
wheel                     0.31.1                   py36_0    defaults
widgetsnbextension        3.2.1                    py36_0    defaults
win_inet_pton             1.0.1            py36he67d7fd_1    defaults
win_unicode_console       0.5              py36hcdbd4b5_0    defaults
wincertstore              0.2              py36h7fe50ca_0    defaults
winpty                    0.4.3                         4    defaults
wrapt                     1.10.11          py36he5f5981_0    defaults
xlrd                      1.1.0            py36h1cb58dc_1    defaults
xlsxwriter                1.0.4                    py36_0    defaults
xlwings                   0.11.8                   py36_0    defaults
xlwt                      1.3.0            py36h1a4751e_0    defaults
yaml                      0.1.7                hc54c509_2    defaults
zeromq                    4.2.5                hc6251cf_0    defaults
zict                      0.1.3            py36h2d8e73e_0    defaults
zlib                      1.2.11               h8395fce_2    defaults
anaconda-navigator

Collected after installing 5.2.0

(base) C:\Users\patrob>anaconda-navigator
Traceback (most recent call last):
  File "C:\Users\patrob\Anaconda3\lib\site-packages\qtpy\__init__.py", line 166, in <module>
    from PySide import __version__ as PYSIDE_VERSION  # analysis:ignore
ModuleNotFoundError: No module named 'PySide'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\patrob\Anaconda3\Scripts\anaconda-navigator-script.py", line 6, in <module>
    from anaconda_navigator.app.main import main
  File "C:\Users\patrob\Anaconda3\lib\site-packages\anaconda_navigator\app\main.py", line 22, in <module>
    from anaconda_navigator.utils.conda import is_conda_available
  File "C:\Users\patrob\Anaconda3\lib\site-packages\anaconda_navigator\utils\__init__.py", line 15, in <module>
    from qtpy.QtGui import QIcon
  File "C:\Users\patrob\Anaconda3\lib\site-packages\qtpy\__init__.py", line 172, in <module>
    raise PythonQtError('No Qt bindings could be found')
qtpy.PythonQtError: No Qt bindings could be found
@nehaljwani
Copy link

@probit2011 By any chance, do you happen to have PYTHONPATH environment variable set? Could you share output for:

set PATH
set PYTHONPATH

@probit2011
Copy link
Author

probit2011 commented Oct 23, 2018

@nehaljwani Sure, here they are:

(base) C:\Users\patrob>set PATH
Path=C:\Users\patrob\Anaconda3;C:\Users\patrob\Anaconda3\Library\mingw-w64\bin;C:\Users\patrob\Anaconda3\Library\usr\bin;C:\Users\patrob\Anaconda3\Library\bin;C:\Users\patrob\Anaconda3\Scripts;C:\Users\patrob\Anaconda3\bin;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Hewlett-Packard\HP Performance Advisor;c:\Program Files\Intel\WiFi\bin\;c:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\HP\HP Performance Advisor;C:\HashiCorp\Vagrant\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Users\patrob\AppData\Local\Microsoft\WindowsApps;
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

(base) C:\Users\patrob>set PYTHONPATH
Environment variable PYTHONPATH not defined

(base) C:\Users\patrob>

So, I guess that if there was meant to be a PYTHONPATH set, the installer didn't take care of that?

@animuss
Copy link

animuss commented Oct 26, 2018

i have the same issue for weeks. i re-installed many times but same result. anaconda is a crap for windows 10 users

@msarahan
Copy link
Contributor

Reinstalling can't help issues that originate in conflicts with the state of your system. Unfortunately, some software developers put qt software in very global locations. Because of the way that Windows works, it's pretty easy for the wrong thing to get found.

You may also have existing configuration from a prior Python installation. That configuration may be incompatible with Anaconda as it comes by default. We test on clean VMs, and we can't possibly hope to test for every conceivable user configuration. If you help us understand what configuration is breaking your system, we can try to add tests for it.

Calling anaconda crap is impolite. Please keep comments here technical, objective, and free of insults.

@probit2011
Copy link
Author

@msarahan As an additional piece of information, Anaconda 4.4.0 was the very first Python installation on this laptop and worked without any problems for more than a year. That was until I tried to upgrade to 5.3.0. Hope it helps.

@mingwandroid
Copy link

That only means 4.4 was compatible with Easter broken DLLs you have in Windows\System32 while our newest software is not.

@probit2011
Copy link
Author

@mingwandroid What would be your suggested solution? Wait for a new Anaconda release? Remove/modify some files?

@mingwandroid
Copy link

mingwandroid commented Oct 26, 2018

Please open a normal cmd.exe prompt (not Anaconda Prompt) and issue:

where Qt5Core.dll

and also:

where zlib.dll

.. and paste the results.

@probit2011
Copy link
Author

Not looking good...

C:\Users\patrob>where Qt5Core.dll
INFO: Could not find files for the given pattern(s).

C:\Users\patrob>where zlib.dll
INFO: Could not find files for the given pattern(s).

@mingwandroid
Copy link

Please repeat the same from the Anaconda Prompt, I'm somewhat at a loss at present.

@probit2011
Copy link
Author

Looks like Windows 10 is playing hide-and-seek with us...

(base) C:\Users\patrob>where Qt5Core.dll
C:\Users\patrob\Anaconda3\Library\bin\Qt5Core.dll

(base) C:\Users\patrob>where zlib.dll
C:\Users\patrob\Anaconda3\Library\bin\zlib.dll

@mingwandroid
Copy link

Oh no, this is all as it should be, but I'm still at a loss! Unfortunately further diagnosis requires using something like procmon to see what is going on at quite a low level. This tool isn't very user-friendly, but if you are willing to perservere with it (use filters to exclude executables other than python.exe) then try to launch anaconda-navigator from the Anaconda Prompt and then study the output.

@probit2011
Copy link
Author

If we want to get to the bottom of it (not just for me, but other users), I guess that's what I'll have to do. I'll download and get familiar with procmon, and will get back to you once I have some results.

@probit2011
Copy link
Author

It wasn't too hard to use, your instructions were just what I needed (the help menu doesn't even work :) ).

I have attached a xlsx file containing the >3000 entries I received after trying to launch anaconda-navigator. There are a fair few 'name not found' entries.
Logfile.xlsx

@mingwandroid
Copy link

Any chance of exporting as a csv? Preview on mac is having some difficultly with the xlsx for me.

@probit2011
Copy link
Author

Doesn't look like csv is an acceptable format here, so I'll give .txt instead.
Logfile.txt

@mingwandroid
Copy link

mingwandroid commented Oct 27, 2018

Great, this is really useful for us so we can make our software more robust and isolated. Thank you for taking the time!

I see:

"11:20:24.3381154 AM","python.exe","15772","CreateFile","C:\Users\patrob\Anaconda3\Modules\Setup.dist","PATH NOT FOUND","Desired Access: Read Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Open Reparse Point, Attributes: N, ShareMode: None, AllocationSize: n/a"
"11:20:24.3382846 AM","python.exe","15772","CreateFile","C:\Users\patrob\Anaconda3\Modules\Setup.local","PATH NOT FOUND","Desired Access: Read Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Open Reparse Point, Attributes: N, ShareMode: None, AllocationSize: n/a"
"11:20:24.3389603 AM","python.exe","15772","CreateFile","C:\Users\patrob\AppData\Roaming\Python\Python36\site-packages","SUCCESS","Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened"


Can you show the contents of C:\Users\patrob\AppData\Roaming\Python\Python36\site-packages please?

@probit2011
Copy link
Author

 Directory of C:\Users\patrob\AppData\Roaming\Python\Python36\site-packages

11/10/2018  11:58 PM    <DIR>          .
11/10/2018  11:58 PM    <DIR>          ..
11/10/2018  11:58 PM    <DIR>          PyQt5
11/10/2018  11:58 PM    <DIR>          PyQt5-5.11.3.dist-info
               0 File(s)              0 bytes
               4 Dir(s)  274,787,196,928 bytes free

@mingwandroid
Copy link

I believe that this is what's causing you these problems and to fix them you could just remove this site-packages folder, but I'd like to figure out what's causing python to look in this folder at all.

Can you check for Python related registry keys? Perhaps search regedit for Python\Python36?

@probit2011
Copy link
Author

OK, I just plainly remove the site-packages folder?

Couldn't find Python\Python36 in regedit, but found this:
image

@mingwandroid
Copy link

Yes, this a remnant from some old installation of Python I think.

What's under InstallPath?

@probit2011
Copy link
Author

probit2011 commented Oct 27, 2018

Both of them have a InstallGroup folder with Data = Python 3.6.

I removed the folder and was able to launch Anaconda Navigator and Spyder. Thanks for your help @mingwandroid !

@mingwandroid
Copy link

OK I have tracked down exactly why this is happening, the code that determines the python search path is here:

    bufsz += wcslen(PYTHONPATH) + 1;
    bufsz += wcslen(calculate->argv0_path) + 1;
    if (calculate->user_path) {
        bufsz += wcslen(calculate->user_path) + 1;
    }
    if (calculate->machine_path) {
        bufsz += wcslen(calculate->machine_path) + 1;
    }
    bufsz += wcslen(calculate->zip_path) + 1;
    if (core_config->module_search_path_env != NULL) {
        bufsz += wcslen(core_config->module_search_path_env) + 1;
}

Hi @zooba, sorry to trouble you but I'd really appreciate if you could scan this bug report. I think for Anaconda Distro, we would like to have core_config->module_search_path_env come first, or some other way of isolating us from this kind of binary incompatibility. Do you have any thoughts, comments or concerns? I am really nervous about the ramifications of such a change though.

@mingwandroid
Copy link

I removed the folder and was able to launch Anaconda Navigator and Spyder. Thanks for your help!

Great! And thank you for helping us to identify what's going on here.

@zooba
Copy link

zooba commented Oct 27, 2018

If your sys.winver is still 3.6 then you may be picking up the PythonPath value from the registry.

You're already patching CPython before you build, right? In getpathp.c there's a line:

static const WCHAR keyPrefix[] = L"Software\\Python\\PythonCore\\";

If you update this to point at your key, then it won't pick up a regular install of Python.

@mingwandroid
Copy link

mingwandroid commented Oct 27, 2018

Thanks @zooba,

You're already patching CPython before you build, right?

Yes, we have a few too many patches unfortunately! We could should/change the key here.

The issue with using the registry for this for AD is that it doesn't fit in too well with conda's environments (and the python version in any env. including the base one can be changed even between Python 2 and 3).

If we were to swap the order things would be better for most of our users, except those who have modules in that directory that they would prefer to be run instead of those from AD. If we change it we would break things for them.

Do you think we should strive for isolation here, perhaps adding a custom env var to restore the old ordering (or select from various options around whether to use the registry and the ordering to use when we do use it).

@msarahan
Copy link
Contributor

Given that each environment will need to be self-contained, I would argue that we should remove the registry stuff from our search path. Perhaps it's OK for the root env, but we do not want it to apply to any child envs.

@mingwandroid
Copy link

Thanks @msarahan, I guess we should have a discussion around this. I'm super keen to get our most painful WIndows problems fixed up.

@mingwandroid
Copy link

mingwandroid commented Oct 27, 2018

We definitely don't want the registry added during installation (which is handled by our Python interpreter for the most part), so we need some way to disable it dynamically I think (if we go for keeping it in the root env, I think the installing Python would probably consider itself in the root env?)

@zooba
Copy link

zooba commented Oct 27, 2018

Python since 3.5 or 3.6 should be finding Lib/os.py first before falling back on the registry, but I believe the PythonPath key is used unconditionally. So if you ensure that the landmark file can be found, you can leave out the PythonPath key and make sure that Python doesn't look at another installation then it'll be fine.

@csoja csoja added the type-bug label Oct 29, 2018
@mingwandroid
Copy link

New Python builds have been released. They do not perform the registry lookup. If you need this to happen still, then you can set CONDA_PY_ALLOW_REG_PATHS to non-'0'.

@HightAE
Copy link

HightAE commented Nov 9, 2019

@mingwandroid if I also provide you my procomon output, would you be able to help me identify my issue? Following the tips in this thread (admittedly a bit haphazardly) didn't resolve my issue. I am the person referenced above, #11424

Logfile_HightAE.txt

@cnickle
Copy link

cnickle commented Nov 10, 2019

I'm having the same problem as well. I've tried to follow through with this but unable to solve the problem on my own. Is anyone still monitoring this issue?

@veribus
Copy link

veribus commented Nov 13, 2019

I'm having the same problem as well. I've tried to follow through with this but unable to solve the problem on my own. Is anyone still monitoring this issue?

I was trying to delete the wrong folder (from the image above). What worked for me is go to this path and delete the site-packages folder. C:\Users\langs\AppData\Roaming\Python\Python37

If you're using File Explorer to locate the site-packages folder, you may need to show hidden folders to find the AppData folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants