ContinuumIO / anaconda-issues

Anaconda issue tracking
648 stars 223 forks source link

Anaconda-Navigator launches Spyder and Jupyter with wrong enviroment #11849

Open felikskiszkurno opened 4 years ago

felikskiszkurno commented 4 years ago

Actual Behavior

Anaconda-Navigator opens Jupyter and Spyder in the default environment regardless, of which one is currently activated. In Spyder I have to change Python interpreter in settings. In jupyter only one kernel is available, so I can force it to use different environment.

Expected Behavior

Anaconda-Navigator should start Spyder and Jupyter with interpreter matching the environment from which they are started from. If they are started from "base", "base" should be the interpreter. IF they are started from "env1", "env1" should be the interpreter.

Steps to Reproduce

Create at least one enviroment apart from "base". Try to run Spyder or Jupyter not from "base".

Operating System:

Pop_OS (Ubuntu 20.04)

conda info
``` PASTE OUTPUT HERE: ``` active environment : bert active env location : /home/kubakiszkurno/anaconda3/envs/bert shell level : 2 user config file : /home/kubakiszkurno/.condarc populated config files : /home/kubakiszkurno/.condarc conda version : 4.8.3 conda-build version : 3.18.11 python version : 3.7.7.final.0 virtual packages : __glibc=2.31 base environment : /home/kubakiszkurno/anaconda3 (writable) channel URLs : https://conda.anaconda.org/conda-forge/linux-64 https://conda.anaconda.org/conda-forge/noarch https://conda.anaconda.org/gimli/linux-64 https://conda.anaconda.org/gimli/noarch https://repo.anaconda.com/pkgs/main/linux-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/linux-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /home/kubakiszkurno/anaconda3/pkgs /home/kubakiszkurno/.conda/pkgs envs directories : /home/kubakiszkurno/anaconda3/envs /home/kubakiszkurno/.conda/envs platform : linux-64 user-agent : conda/4.8.3 requests/2.23.0 CPython/3.7.7 Linux/5.4.0-7634-generic pop/20.04 glibc/2.31 UID:GID : 1000:1000 netrc file : None offline mode : False ```
conda list --show-channel-urls
``` # packages in environment at /home/kubakiszkurno/anaconda3/envs/bert: # # Name Version Build Channel _libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 1_llvm conda-forge alabaster 0.7.12 py_0 conda-forge appdirs 1.4.3 py_1 conda-forge argh 0.26.2 py37_1001 conda-forge astroid 2.4.1 py37hc8dfbb8_0 conda-forge atomicwrites 1.4.0 pyh9f0ad1d_0 conda-forge attrs 19.3.0 py_0 conda-forge autopep8 1.4.4 py_0 defaults babel 2.8.0 py_0 conda-forge backcall 0.1.0 py_0 conda-forge binutils_impl_linux-64 2.34 h53a641e_4 conda-forge binutils_linux-64 2.34 hc952b39_20 conda-forge bleach 3.1.5 pyh9f0ad1d_0 conda-forge boost 1.73.0 py37h429e714_0 conda-forge boost-cpp 1.73.0 h6c875cf_0 conda-forge brotlipy 0.7.0 py37h8f50634_1000 conda-forge bzip2 1.0.8 h516909a_2 conda-forge ca-certificates 2020.4.5.1 hecc5488_0 conda-forge certifi 2020.4.5.1 py37hc8dfbb8_0 conda-forge cffi 1.14.0 py37hd463f26_0 conda-forge cftime 1.1.3 py37h03ebfcd_0 conda-forge chardet 3.0.4 py37hc8dfbb8_1006 conda-forge cloudpickle 1.4.1 py_0 conda-forge cryptography 2.9.2 py37hb09aad4_0 conda-forge curl 7.69.1 h33f0ec9_0 conda-forge cycler 0.10.0 py_2 conda-forge dbus 1.13.6 he372182_0 conda-forge decorator 4.4.2 py_0 conda-forge defusedxml 0.6.0 py_0 conda-forge diff-match-patch 20181111 py_0 conda-forge docutils 0.16 py37hc8dfbb8_1 conda-forge entrypoints 0.3 py37hc8dfbb8_1001 conda-forge expat 2.2.9 he1b5a44_2 conda-forge flake8 3.7.9 py37hc8dfbb8_1 conda-forge fontconfig 2.13.1 h86ecdb6_1001 conda-forge freetype 2.10.2 he06d7ca_0 conda-forge future 0.18.2 py37hc8dfbb8_1 conda-forge gcc_impl_linux-64 7.5.0 hd420e75_6 conda-forge gcc_linux-64 7.5.0 h09487f9_20 conda-forge gettext 0.19.8.1 hc5be6a0_1002 conda-forge glib 2.64.3 h6f030ca_0 conda-forge gst-plugins-base 1.14.5 h0935bb2_2 conda-forge gstreamer 1.14.5 h36ae1b5_2 conda-forge gxx_impl_linux-64 7.5.0 hdf63c60_6 conda-forge gxx_linux-64 7.5.0 h09487f9_20 conda-forge h5py 2.10.0 nompi_py37h513d04c_102 conda-forge hdf4 4.2.13 hf30be14_1003 conda-forge hdf5 1.10.5 nompi_h3c11f04_1104 conda-forge icu 64.2 he1b5a44_1 conda-forge idna 2.9 py_1 conda-forge imageio 2.8.0 py_0 conda-forge imagesize 1.2.0 py_0 conda-forge importlib-metadata 1.6.0 py37hc8dfbb8_0 conda-forge importlib_metadata 1.6.0 0 conda-forge intervaltree 3.0.2 py_0 conda-forge ipykernel 5.3.0 py37h43977f1_0 conda-forge ipython 7.15.0 py37hc8dfbb8_0 conda-forge ipython_genutils 0.2.0 py_1 conda-forge isort 4.3.21 py37hc8dfbb8_1 conda-forge jedi 0.15.2 py37_0 conda-forge jeepney 0.4.3 py_0 conda-forge jinja2 2.11.2 pyh9f0ad1d_0 conda-forge jpeg 9d h516909a_0 conda-forge jsoncpp 1.8.4 hc9558a2_1002 conda-forge jsonschema 3.2.0 py37hc8dfbb8_1 conda-forge jupyter_client 6.1.3 py_0 conda-forge jupyter_core 4.6.3 py37hc8dfbb8_1 conda-forge keyring 21.2.1 py37hc8dfbb8_0 conda-forge kiwisolver 1.2.0 py37h99015e2_0 conda-forge krb5 1.17.1 h2fd8d38_0 conda-forge lazy-object-proxy 1.4.3 py37h8f50634_2 conda-forge ld_impl_linux-64 2.34 h53a641e_4 conda-forge libblas 3.8.0 16_openblas conda-forge libcblas 3.8.0 16_openblas conda-forge libclang 9.0.1 default_hde54327_0 conda-forge libcurl 7.69.1 hf7181ac_0 conda-forge libedit 3.1.20191231 h46ee950_0 conda-forge libffi 3.2.1 he1b5a44_1007 conda-forge libgcc-ng 9.2.0 h24d8f2e_2 conda-forge libgfortran-ng 7.5.0 hdf63c60_6 conda-forge libgomp 9.2.0 h24d8f2e_2 conda-forge libiconv 1.15 h516909a_1006 conda-forge liblapack 3.8.0 16_openblas conda-forge libllvm9 9.0.1 he513fc3_1 conda-forge libnetcdf 4.7.4 nompi_h9f9fd6a_101 conda-forge libopenblas 0.3.9 h5ec1e0e_0 conda-forge libpng 1.6.37 hed695b0_1 conda-forge libsodium 1.0.17 h516909a_0 conda-forge libspatialindex 1.9.3 he1b5a44_3 conda-forge libssh2 1.9.0 hab1572f_2 conda-forge libstdcxx-ng 9.2.0 hdf63c60_2 conda-forge libtiff 4.1.0 hc7e4089_6 conda-forge libuuid 2.32.1 h14c3975_1000 conda-forge libwebp-base 1.1.0 h516909a_3 conda-forge libxcb 1.13 h14c3975_1002 conda-forge libxkbcommon 0.10.0 he1b5a44_0 conda-forge libxml2 2.9.10 hee79883_0 conda-forge llvm-openmp 10.0.0 hc9558a2_0 conda-forge lz4-c 1.9.2 he1b5a44_1 conda-forge markupsafe 1.1.1 py37h8f50634_1 conda-forge matplotlib 3.2.1 0 conda-forge matplotlib-base 3.2.1 py37h30547a4_0 conda-forge mccabe 0.6.1 py_1 conda-forge meshio 4.0.13 py_0 conda-forge metis 5.1.0 he1b5a44_1005 conda-forge mistune 0.8.4 py37h8f50634_1001 conda-forge more-itertools 8.3.0 py_1 conda-forge nbconvert 5.6.1 py37hc8dfbb8_1 conda-forge nbformat 5.0.6 py_0 conda-forge ncurses 6.1 hf484d3e_1002 conda-forge netcdf4 1.5.3 nompi_py37hec16513_103 conda-forge notebook 6.0.3 py37hc8dfbb8_0 conda-forge nspr 4.25 he1b5a44_0 conda-forge nss 3.47 he751ad9_0 conda-forge numpy 1.18.4 py37h8960a57_0 conda-forge numpydoc 1.0.0 pyh9f0ad1d_0 conda-forge olefile 0.46 py_0 conda-forge openblas 0.3.9 he1df0ab_0 conda-forge openssl 1.1.1g h516909a_0 conda-forge packaging 20.4 pyh9f0ad1d_0 conda-forge pandoc 2.9.2.1 0 conda-forge pandocfilters 1.4.2 py_1 conda-forge parso 0.5.2 py_0 defaults pathtools 0.1.2 py_1 conda-forge pcre 8.44 he1b5a44_0 conda-forge pexpect 4.8.0 py37hc8dfbb8_1 conda-forge pickleshare 0.7.5 py37hc8dfbb8_1001 conda-forge pillow 7.1.2 py37h718be6c_0 conda-forge pip 20.1.1 py_1 conda-forge pluggy 0.13.1 py37hc8dfbb8_1 conda-forge prometheus_client 0.8.0 pyh9f0ad1d_0 conda-forge prompt-toolkit 3.0.5 py_0 conda-forge psutil 5.7.0 py37h8f50634_1 conda-forge pthread-stubs 0.4 h14c3975_1001 conda-forge ptyprocess 0.6.0 py_1001 conda-forge py 1.8.1 py_0 conda-forge pybert 2.3.0_0 py37hf484d3e_0 gimli pycodestyle 2.5.0 py37_0 defaults pycparser 2.20 py_0 conda-forge pydocstyle 5.0.2 py_0 conda-forge pyflakes 2.1.1 py37_0 defaults pygimli 1.1.0 np118py37hf484d3e_3 gimli pygments 2.6.1 py_0 conda-forge pylint 2.5.2 py37hc8dfbb8_0 conda-forge pyopenssl 19.1.0 py_1 conda-forge pyparsing 2.4.7 pyh9f0ad1d_0 conda-forge pyqt 5.12.3 py37h8685d9f_3 conda-forge pyqt5-sip 4.19.18 pypi_0 pypi pyqtchart 5.12 pypi_0 pypi pyqtwebengine 5.12.1 pypi_0 pypi pyrsistent 0.16.0 py37h8f50634_0 conda-forge pysocks 1.7.1 py37hc8dfbb8_1 conda-forge pytest 5.4.3 py37hc8dfbb8_0 conda-forge python 3.7.6 cpython_h8356626_6 conda-forge python-dateutil 2.8.1 py_0 conda-forge python-jsonrpc-server 0.3.4 pyh9f0ad1d_1 conda-forge python-language-server 0.31.10 py37hc8dfbb8_0 conda-forge python_abi 3.7 1_cp37m conda-forge pytz 2020.1 pyh9f0ad1d_0 conda-forge pyvista 0.24.3 py_0 conda-forge pyxdg 0.26 py_0 conda-forge pyyaml 5.3.1 py37h8f50634_0 conda-forge pyzmq 19.0.1 py37hac76be4_0 conda-forge qdarkstyle 2.8.1 pyh9f0ad1d_0 conda-forge qt 5.12.5 hd8c4c69_1 conda-forge qtawesome 0.7.2 pyh9f0ad1d_0 conda-forge qtconsole 4.7.4 pyh9f0ad1d_0 conda-forge qtpy 1.9.0 py_0 conda-forge readline 8.0 hf8c457e_0 conda-forge requests 2.23.0 pyh8c360ce_2 conda-forge rope 0.17.0 pyh9f0ad1d_0 conda-forge rtree 0.9.4 py37h8526d28_1 conda-forge scipy 1.4.1 py37ha3d9a3c_3 conda-forge scooby 0.5.4 pyh9f0ad1d_0 conda-forge secretstorage 3.1.2 py37hc8dfbb8_1 conda-forge send2trash 1.5.0 py_0 conda-forge setuptools 47.1.1 py37hc8dfbb8_0 conda-forge six 1.15.0 pyh9f0ad1d_0 conda-forge snowballstemmer 2.0.0 py_0 conda-forge sortedcontainers 2.1.0 py_0 conda-forge sphinx 3.0.4 py_0 conda-forge sphinxcontrib-applehelp 1.0.2 py_0 conda-forge sphinxcontrib-devhelp 1.0.2 py_0 conda-forge sphinxcontrib-htmlhelp 1.0.3 py_0 conda-forge sphinxcontrib-jsmath 1.0.1 py_0 conda-forge sphinxcontrib-qthelp 1.0.3 py_0 conda-forge sphinxcontrib-serializinghtml 1.1.4 py_0 conda-forge spyder 4.1.3 py37hc8dfbb8_0 conda-forge spyder-kernels 1.9.1 py37hc8dfbb8_0 conda-forge sqlite 3.30.1 hcee41ef_0 conda-forge suitesparse 5.7.2 h717dc36_0 conda-forge sysroot_linux-64 2.12 h3a0023d_5 conda-forge tbb 2020.1 hc9558a2_0 conda-forge terminado 0.8.3 py37hc8dfbb8_1 conda-forge testpath 0.4.4 py_0 conda-forge tetgen 1.5.1 he1b5a44_1000 conda-forge tk 8.6.10 hed695b0_0 conda-forge toml 0.10.1 pyh9f0ad1d_0 conda-forge tornado 6.0.4 py37h8f50634_1 conda-forge traitlets 4.3.3 py37hc8dfbb8_1 conda-forge typed-ast 1.4.1 py37h516909a_0 conda-forge ujson 1.35 py37h3340039_1002 conda-forge urllib3 1.25.9 py_0 conda-forge vtk 8.2.0 py37h351a6da_214 conda-forge watchdog 0.10.2 py37_0 conda-forge wcwidth 0.2.3 pyh9f0ad1d_0 conda-forge webencodings 0.5.1 py_1 conda-forge wheel 0.34.2 py_1 conda-forge wrapt 1.11.2 py37h8f50634_0 conda-forge wurlitzer 2.0.0 py37hc8dfbb8_1 conda-forge xorg-kbproto 1.0.7 h14c3975_1002 conda-forge xorg-libice 1.0.10 h516909a_0 conda-forge xorg-libsm 1.2.3 h84519dc_1000 conda-forge xorg-libx11 1.6.9 h516909a_0 conda-forge xorg-libxau 1.0.9 h14c3975_0 conda-forge xorg-libxdmcp 1.1.3 h516909a_0 conda-forge xorg-libxt 1.2.0 h516909a_0 conda-forge xorg-xproto 7.0.31 h14c3975_1007 conda-forge xz 5.2.5 h516909a_0 conda-forge yaml 0.2.5 h516909a_0 conda-forge yapf 0.29.0 py_0 conda-forge zeromq 4.3.2 he1b5a44_2 conda-forge zipp 3.1.0 py_0 conda-forge zlib 1.2.11 h516909a_1006 conda-forge zstd 1.4.4 h6597ccf_3 conda-forge ```
idlinds commented 4 years ago

Same issue. 2020-07 version of Anaconda running on Linux Mint Debian Edition 4 (based on Debian Buster). Two environments available, "base" and "working", the former created at installation and the latter cloned from "base" using conda create --clone. Launching Jupyter Notebook or QT Console from Anaconda Navigator always launches in "base" environment, regardless of which environment is selected in the "Applications on" drop-down.This means packages installed in "working" are not available, even though they appear correctly on the packages list for that environment. Also checked this using sys.executable to obtain path to current Python interpreter. This is always ~/anaconda3/bin/python regardless of the environment selected. Launching Jupyter Notebook or QT Console directly from a terminal session with the appropriate environment activated shows correct behaviour: packages in that environment can be imported and sys.executable points to ~/anaconda3/envs/working/bin/python when "working" environment is active.

juartinv commented 2 years ago

+1, exact same behavior as described previously. Anaconda Navigator 1.9.2 Jupyter Notebook 6.0.3 Linux Mint 20 Cinnamon

csoja commented 2 years ago

@juartinv The latest release of Anaconda Navigator is version 2.2. Can you update to the latest and confirm you still see it?