You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tried the other applicable steps from the Troubleshooting Guide
Completed the Problem Description, Steps to Reproduce and Version sections below
Problem Description
When installing spyder with conda the permissions of the conda-activate.sh script are incorrect, they're missing execute permissions.
Additionally, the line endings are Windows style line endings. This being an .sh script this results in an error when Spyder is started with a non-default interpreter (as it then tries to use this script I assume).
What steps reproduce the problem?
Not sure how to force that conda re-downloads a package, hence the first two steps.
Remove all conda environment with spyder 4.2.1 installed in them.
Clean all cached conda packages: conda clean --all
Create a new conda environment with spyder in it: conda create --name spyder python=3.8; conda activate spyder; conda install -c conda-forge spyder
Create a separate conda environment: conda create --name some_project python=3.8 spyder-kernels
Start spyder: conda activate spyder; spyder
In the spyder preference set the non-default python interpreter (some_project from step 4).
Restart spyder
What is the expected output? What do you see instead?
Expected: spyder starts with a console from some_project.
Actual: an error is shown:
An error ocurred while starting the kernel
The error is:
Traceback (most recent call last):
File "/Users/ba/opt/anaconda3/envs/spyder/lib/python3.8/site‑packages/spyder/plugins/ipythonconsole/plugin.py", line 1427, in create_kernel_manager_and_kernel_client
kernel_manager.start_kernel(stderr=stderr_handle,
File "/Users/ba/opt/anaconda3/envs/spyder/lib/python3.8/site‑packages/jupyter_client/manager.py", line 313, in start_kernel
self.kernel = self._launch_kernel(kernel_cmd, **kw)
File "/Users/ba/opt/anaconda3/envs/spyder/lib/python3.8/site‑packages/jupyter_client/manager.py", line 220, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "/Users/ba/opt/anaconda3/envs/spyder/lib/python3.8/site‑packages/jupyter_client/launcher.py", line 131, in launch_kernel
proc = Popen(cmd, **kwargs)
File "/Users/ba/opt/anaconda3/envs/spyder/lib/python3.8/subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/Users/ba/opt/anaconda3/envs/spyder/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: '/Users/ba/opt/anaconda3/envs/spyder/lib/python3.8/site‑packages/spyder/plugins/ipythonconsole/scripts/conda‑activate.sh'
When checking the permissions of the script file they seem to be missing the x permission:
➜ ls -lah /Users/ba/opt/anaconda3/pkgs/spyder-4.2.1-py38h50d1736_0/lib/python3.8/site-packages/spyder/plugins/ipythonconsole/scripts/conda-activate.sh
-rw-rw-r-- 2 ba staff 393B Dec 20 02:50 /Users/ba/opt/anaconda3/pkgs/spyder-4.2.1-py38h50d1736_0/lib/python3.8/site-packages/spyder/plugins/ipythonconsole/scripts/conda-activate.sh
After fixing that with chmod a+x conda-activate.sh spyder starts with a non-default interpeter some_project, but shows a different error:
An error ocurred while starting the kernel
env: bash\r: No such file or directoryenv: bash\r: No such file or directory
Checking the line endings of conda-activate.sh I see that these are Windows style, not unix style:
➜ file conda-activate.sh
conda-activate.sh: Bourne-Again shell script text executable, ASCII text, with CRLF line terminators
Once that is fixed (i.e. line endings are converted to unix style) I end up with issue #14480.
Issue Report Checklist
conda update spyder
(orpip
, if not using Anaconda)jupyter qtconsole
(if console-related)spyder --reset
Problem Description
When installing spyder with conda the permissions of the
conda-activate.sh
script are incorrect, they're missing execute permissions.Additionally, the line endings are Windows style line endings. This being an
.sh
script this results in an error when Spyder is started with a non-default interpreter (as it then tries to use this script I assume).What steps reproduce the problem?
Not sure how to force that conda re-downloads a package, hence the first two steps.
conda clean --all
conda create --name spyder python=3.8; conda activate spyder; conda install -c conda-forge spyder
conda create --name some_project python=3.8 spyder-kernels
conda activate spyder; spyder
some_project
from step 4).What is the expected output? What do you see instead?
Expected: spyder starts with a console from
some_project
.Actual: an error is shown:
When checking the permissions of the script file they seem to be missing the
x
permission:After fixing that with
chmod a+x conda-activate.sh
spyder starts with a non-default interpetersome_project
, but shows a different error:Checking the line endings of
conda-activate.sh
I see that these are Windows style, not unix style:Once that is fixed (i.e. line endings are converted to unix style) I end up with issue #14480.
Versions
Dependencies
The text was updated successfully, but these errors were encountered: