0

this is rather long winded, but it's quite a specific problem (I think).


Background Info:


I'm running on windows 10, python 3.9.7 and Spyder 5.1.5. Spyder was downloaded from the standalone installer, and python through miniconda3.

I'm using a work PC, and this has certain restrictions: I can't download software to C:\Users\<user>, because the profile is synced with a server every time the PC is turned on/off, and so if software is downloaded here it takes >60mins to turn back on as it communicates with the server. Hence I requested the administrator to download miniconda3 to C:\ProgramData\Miniconda3 and Spyder to C:\Program Files\Spyder. Clearly this isn't ideal, but I didn't have that much choice.


Current problem:


I have already read this question, so I hope it's not too similar. Following the github instructions for the modular approach of installing spyder-kernels in the virtual environment, I get the problem that running python -c "import sys; print(sys.executable)" inside my virtual environment (C:\ProgramData\Miniconda3\spyderenv) gives the path C:\ProgramData\Miniconda3\python.exe. This seems obviously wrong as it's not inside the virtual environment... and also when trying to start a kernel I get the message "Your Python environment or installation doesn't have the spyder‑kernels module or the right version of it installed (>= 2.1.0 and < 2.2.0). Without this module is not possible for Spyder to create a console for you." Spyder-kernels 2.1.1 is definitely installed in the syderenv virtual environment, and is also seen in the Spyder Dependencies list.

If instead I use C:\ProgramData\Miniconda3\spyderenv\pythonw.exe as the interpreter path, the error message "The code execution cannot proceed because zlib.dll was not found. Reinstalling the program may fix this problem.". I have tried to find an answer as to where zlib should be reinstalled, but having no luck.

Additionally, when I run e.g. conda install numpy within the spyderenv virtual environment, the location is given as environment location: C:\ProgramData\Miniconda3\spyderenv, but the packages end up installed in C:\Users\<user>\.conda\pkgs. Is this causing the problems, and can it be changed?

Sorry that this is so long, and that it maybe includes multiple problems, but I'm really lost.

Would greatly appreciate it if someone could give me an idea of what I'm doing wrong! Thanks.

feyel
  • 1
  • 2

0 Answers0