Skip to content

Commit 38f9397

Browse files
committed
Resolve issue where splash screen was incorrectly rendered if conda environment is not activated (shortcuts).
1 parent 40ff4d2 commit 38f9397

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

spyder/app/start.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
from spyder.app.cli_options import get_options
5454
from spyder.config.base import (get_conf_path, reset_config_files,
5555
running_under_pytest, is_conda_based_app)
56-
from spyder.utils.conda import get_conda_root_prefix
56+
from spyder.utils.conda import get_conda_root_prefix, is_conda_env
5757
from spyder.utils.external import lockfile
5858
from spyder.py3compat import is_text_string
5959

@@ -74,6 +74,14 @@
7474
else:
7575
os.environ['CONDA_EXE'] = conda_root + '/bin/conda'
7676

77+
# Qt needs to find libraries in Library\bin to render splash screen properly.
78+
# If running in a conda environment that is not activated, then we need to add
79+
# this path to PATH. See spyder-ide/spyder#22374
80+
if os.name == 'nt' and is_conda_env(pyexec=sys.executable):
81+
bin_path = osp.join(sys.prefix, r'Library\bin')
82+
if bin_path not in os.getenv('PATH'):
83+
os.environ['PATH'] = bin_path + osp.pathsep + os.getenv('PATH')
84+
7785
# Get argv
7886
if running_under_pytest():
7987
sys_argv = [sys.argv[0]]

0 commit comments

Comments
 (0)