ContinuumIO / anaconda-issues

Anaconda issue tracking
646 stars 220 forks source link

spyder does not launch in conda environment #11680

Open smaffei opened 4 years ago

smaffei commented 4 years ago

Actual Behavior

I created a new environment (called it 'dedalus' as the use of that model was the purpose of the environment, but I don't think it's important) with conda, with python 3.7.6 in it (among other things). Everything else in the environment seem to be working fine. I would like to use spyder to code, so I open Anaconda-Navigator and try to launch spyder (version 4.0.1, already tried to update it). Instead of launching, an "Application Launch error" window opens with the following Traceback:

Traceback (most recent call last): File "/opt/anaconda3/envs/dedalus/bin/spyder", line 11, in sys.exit(main()) File "/opt/anaconda3/envs/dedalus/lib/python3.7/site-packages/spyder/app/start.py", line 201, in main from spyder.app import mainwindow File "/opt/anaconda3/envs/dedalus/lib/python3.7/site-packages/spyder/app/mainwindow.py", line 167, in from spyder.utils.environ import WinUserEnvDialog File "/opt/anaconda3/envs/dedalus/lib/python3.7/site-packages/spyder/utils/environ.py", line 19, in from spyder.plugins.variableexplorer.widgets.collectionseditor import ( File "/opt/anaconda3/envs/dedalus/lib/python3.7/site-packages/spyder/plugins/variableexplorer/widgets/collectionseditor.py", line 57, in from spyder.plugins.variableexplorer.widgets.collectionsdelegate import ( File "/opt/anaconda3/envs/dedalus/lib/python3.7/site-packages/spyder/plugins/variableexplorer/widgets/collectionsdelegate.py", line 31, in from spyder.plugins.variableexplorer.widgets.objectexplorer.attribute_model \ File "/opt/anaconda3/envs/dedalus/lib/python3.7/site-packages/spyder/plugins/variableexplorer/widgets/objectexplorer/init.py", line 19, in from .attribute_model import DEFAULT_ATTR_COLS, DEFAULT_ATTR_DETAILS File "/opt/anaconda3/envs/dedalus/lib/python3.7/site-packages/spyder/plugins/variableexplorer/widgets/objectexplorer/attribute_model.py", line 29, in import numpy as np File "/opt/anaconda3/envs/dedalus/lib/python3.7/site-packages/numpy/init.py", line 142, in from . import core File "/opt/anaconda3/envs/dedalus/lib/python3.7/site-packages/numpy/core/init.py", line 107, in from . import _internal File "/opt/anaconda3/envs/dedalus/lib/python3.7/site-packages/numpy/core/_internal.py", line 20, in IS_PYPY = platform.python_implementation() == 'PyPy' File "/opt/anaconda3/envs/dedalus/lib/python3.7/platform.py", line 1264, in python_implementation return _sys_version()[0] File "/opt/anaconda3/envs/dedalus/lib/python3.7/platform.py", line 1225, in _sys_version repr(sys_version)) ValueError: failed to parse CPython sys.version: '3.7.6 (default, Jan 8 2020, 13:42:34) \n[Clang 4.0.1 (tags/RELEASE_401/final)]'

Expected Behavior

I would expect spyder to launch and work. It does on the base environment (with Python 3.7.4 and spyder 3.3.6) or on a python 2 environment (python 2.7.17 and spyder 4.0.1).

Steps to Reproduce

  1. Open Anaconda-Navigator
  2. Activate the dedalus environment
  3. click on the spyder launcher

Alternatively

  1. open the terminal

  2. activate the dedalus conda environment

  3. launch spyder via

    spyder or spyder -- reset

  4. observe the spyder icon jumping in the doc and receive the error message (either in Anaconda-Navigator or in the terminal)

Anaconda or Miniconda version:

Anaconda Navigator 1.9.12

Operating System:
conda info
``` active environment : dedalus active env location : /opt/anaconda3/envs/dedalus shell level : 3 user config file : /Users/Stefano/.condarc populated config files : /Users/Stefano/.condarc conda version : 4.8.3 conda-build version : 3.18.9 python version : 3.7.4.final.0 virtual packages : __osx=10.14.6 base environment : /opt/anaconda3 (writable) channel URLs : 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 : /opt/anaconda3/pkgs /Users/Stefano/.conda/pkgs envs directories : /opt/anaconda3/envs /Users/Stefano/.conda/envs platform : osx-64 user-agent : conda/4.8.3 requests/2.23.0 CPython/3.7.4 Darwin/18.7.0 OSX/10.14.6 UID:GID : 502:20 netrc file : None offline mode : False ```
conda list --show-channel-urls
``` # packages in environment at /opt/anaconda3/envs/dedalus: # # Name Version Build Channel alabaster 0.7.12 py37_0 defaults applaunchservices 0.2.1 py_0 defaults appnope 0.1.0 py37_0 defaults argh 0.26.2 py37_0 defaults asn1crypto 1.3.0 py37_0 defaults astroid 2.3.3 py37_0 defaults atomicwrites 1.3.0 py37_1 defaults attrs 19.3.0 py_0 defaults autopep8 1.4.4 py_0 defaults babel 2.8.0 py_0 defaults backcall 0.1.0 py37_0 defaults blas 2.12 openblas conda-forge bleach 3.1.0 py37_0 defaults ca-certificates 2020.1.1 0 defaults certifi 2019.11.28 py37_0 defaults cffi 1.14.0 py37hb5b8e2f_0 defaults chardet 3.0.4 py37_1003 defaults cloudpickle 1.3.0 py_0 defaults cryptography 2.8 py37ha12b0ac_0 defaults cycler 0.10.0 py37_0 defaults cython 0.29.15 py37h4a8c4bd_0 conda-forge dbus 1.13.12 h90a0687_0 defaults decorator 4.4.2 py_0 defaults dedalus 2.1905 pypi_0 pypi defusedxml 0.6.0 py_0 defaults diff-match-patch 20181111 py_0 defaults docopt 0.6.2 py_1 conda-forge docutils 0.16 py37_0 defaults entrypoints 0.3 py37_0 defaults expat 2.2.6 h0a44026_0 defaults fftw-mpi 3.3.6 2 cryoem flake8 3.7.9 py37_0 defaults freetype 2.9.1 hb4e5f40_0 defaults future 0.18.2 py37_0 defaults gettext 0.19.8.1 h15daf44_3 defaults glib 2.63.1 hd977a24_0 defaults h5py 2.10.0 nompi_py37h106b333_102 conda-forge hdf5 1.10.5 nompi_h0cbb7df_1103 conda-forge icu 58.2 h4b95b61_1 defaults idna 2.8 py37_0 defaults imagesize 1.2.0 py_0 defaults importlib_metadata 1.5.0 py37_0 defaults intervaltree 3.0.2 py_0 defaults ipykernel 5.1.4 py37h39e3cac_0 defaults ipython 7.13.0 py37h5ca1d4c_0 defaults ipython_genutils 0.2.0 py37_0 defaults isort 4.3.21 py37_0 defaults jedi 0.14.1 py37_0 defaults jinja2 2.11.1 py_0 defaults jpeg 9b he5867d9_2 defaults jsonschema 3.2.0 py37_0 defaults jupyter_client 5.3.4 py37_0 defaults jupyter_core 4.6.1 py37_0 defaults keyring 21.1.0 py37_0 defaults kiwisolver 1.1.0 py37h0a44026_0 defaults lazy-object-proxy 1.4.3 py37h1de35cc_0 defaults libblas 3.8.0 12_openblas conda-forge libcblas 3.8.0 12_openblas conda-forge libcxx 9.0.1 1 conda-forge libedit 3.1.20181209 hb402a30_0 defaults libffi 3.2.1 h475c297_4 defaults libgfortran 3.0.1 h93005f0_2 defaults libiconv 1.15 hdd342a3_7 defaults liblapack 3.8.0 12_openblas conda-forge liblapacke 3.8.0 12_openblas conda-forge libopenblas 0.3.7 hd44dcd8_1 conda-forge libpng 1.6.37 ha441bb4_0 defaults libsodium 1.0.16 h3efe00b_0 defaults libspatialindex 1.9.3 h0a44026_0 defaults libtiff 4.1.0 hcb84e12_0 defaults markupsafe 1.1.1 py37h1de35cc_0 defaults matplotlib 3.1.3 py37_0 defaults matplotlib-base 3.1.3 py37h9aa3819_0 defaults mccabe 0.6.1 py37_1 defaults mistune 0.8.4 py37h1de35cc_0 defaults mpi 1.0 openmpi defaults mpi4py 3.0.1 py37h27a7d74_0 conda-forge nbconvert 5.6.1 py37_0 defaults nbformat 5.0.4 py_0 defaults ncurses 6.2 h0a44026_0 defaults notebook 6.0.3 py37_0 defaults numpy 1.18.1 py37hde6bac1_0 conda-forge numpydoc 0.9.2 py_0 defaults olefile 0.46 py37_0 defaults openmpi 3.1.0 h26a2512_3 conda-forge openssl 1.1.1e h1de35cc_0 defaults packaging 20.3 py_0 defaults pandoc 2.2.3.2 0 defaults pandocfilters 1.4.2 py37_1 defaults parso 0.5.2 py_0 defaults pathtools 0.1.2 py_1 defaults pcre 8.43 h0a44026_0 defaults pexpect 4.8.0 py37_0 defaults pickleshare 0.7.5 py37_0 defaults pillow 7.0.0 py37h4655f20_0 defaults pip 20.0.2 py_2 conda-forge pluggy 0.13.1 py37_0 defaults prometheus_client 0.7.1 py_0 defaults prompt_toolkit 3.0.3 py_0 defaults psutil 5.7.0 py37h1de35cc_0 defaults ptyprocess 0.6.0 py37_0 defaults pycodestyle 2.5.0 py37_0 defaults pycparser 2.19 py37_0 defaults pydocstyle 4.0.1 py_0 defaults pyflakes 2.1.1 py37_0 defaults pygments 2.5.2 py_0 defaults pylint 2.4.4 py37_0 defaults pyopenssl 19.1.0 py37_0 defaults pyparsing 2.4.6 py_0 defaults pyqt 5.9.2 py37h655552a_2 defaults pyrsistent 0.15.7 py37h1de35cc_0 defaults pysocks 1.7.1 py37_0 defaults python 3.7.6 h5c2c468_2 conda-forge python-dateutil 2.8.1 py_0 defaults python-jsonrpc-server 0.3.4 py_0 defaults python-language-server 0.31.7 py37_0 defaults python.app 2 py37_10 defaults pytz 2019.3 py_0 defaults pyyaml 5.3 py37h1de35cc_0 defaults pyzmq 18.1.1 py37h0a44026_0 defaults qdarkstyle 2.8 py_0 defaults qt 5.9.7 h468cd18_1 defaults qtawesome 0.6.1 py_0 defaults qtconsole 4.7.1 py_0 defaults qtpy 1.9.0 py_0 defaults readline 8.0 h1de35cc_0 defaults requests 2.23.0 py37_0 defaults rope 0.16.0 py_0 defaults rtree 0.9.3 py37_0 defaults scipy 1.3.1 py37hab3da7d_2 conda-forge send2trash 1.5.0 py37_0 defaults setuptools 45.2.0 py37_0 conda-forge sip 4.19.8 py37h0a44026_0 defaults six 1.14.0 py37_0 defaults snowballstemmer 2.0.0 py_0 defaults sortedcontainers 2.1.0 py37_0 defaults sphinx 2.4.0 py_0 defaults sphinxcontrib-applehelp 1.0.1 py_0 defaults sphinxcontrib-devhelp 1.0.1 py_0 defaults sphinxcontrib-htmlhelp 1.0.2 py_0 defaults sphinxcontrib-jsmath 1.0.1 py_0 defaults sphinxcontrib-qthelp 1.0.2 py_0 defaults sphinxcontrib-serializinghtml 1.1.3 py_0 defaults spyder 4.0.1 py37_0 defaults spyder-kernels 1.8.1 py37_0 defaults sqlite 3.31.1 ha441bb4_0 defaults terminado 0.8.3 py37_0 defaults testpath 0.4.4 py_0 defaults tk 8.6.10 hbbe82c9_0 conda-forge tornado 6.0.4 py37h1de35cc_1 defaults traitlets 4.3.3 py37_0 defaults ujson 1.35 py37h1de35cc_0 defaults urllib3 1.25.8 py37_0 defaults watchdog 0.10.2 py37h1de35cc_0 defaults wcwidth 0.1.8 py_0 defaults webencodings 0.5.1 py37_1 defaults wheel 0.34.2 py37_0 defaults wrapt 1.11.2 py37h1de35cc_0 defaults wurlitzer 2.0.0 py37_0 defaults xz 5.2.4 h1de35cc_4 defaults yaml 0.1.7 hc338f04_2 defaults yapf 0.28.0 py_0 defaults zeromq 4.3.1 h0a44026_3 defaults zipp 2.2.0 py_0 defaults zlib 1.2.11 h1de35cc_3 defaults zstd 1.3.7 h5bba6e5_0 defaults ```
jjhelmus commented 4 years ago

Does switching to a python package from defaults fix this issue?

smaffei commented 4 years ago

I am sorry, I don't understant what it is that you are suggesting. Are you suggesting to switch to the base environment? If that is what you mean, by switching to the base environment, I seem to be able to start spyder. I also have a python 2 environment from which I can start spyder

jjhelmus commented 4 years ago

I noticed that the python package in the dedalus environment is coming from the conda-forge channel. It is possible that this is causing an issue. Installing a version from defaults may resolve this. This can be done using conda install -c default -n dedalus python.