Open ma-sadeghi opened 3 years ago
Hi @ma-sadeghi,
It seems you don't have Pytorch installed in your environment, can you please install it and try again?
Hi @steff456, I just checked and I already had it installed. If it helps debugging the issue, I'm using a virtual env, which has torch
installed, but Spyder itself is on base
env, which doesn't have it installed.
Did you connect your virtual env as your Python Interpreter?
Yes, actually, torch
worked fine and I was working w/ it in the console while this happened.
When you restarted Spyder, do the error persists?
No, same error. Here are instructions to reproduce it:
Python 3.8.10 | packaged by conda-forge | (default, May 11 2021, 07:01:05)
Type "copyright", "credits" or "license" for more information.
IPython 7.27.0 -- An enhanced Interactive Python.
In [1]: import torch
In [2]: x = torch.rand(5,5)
3. An error message pops up with the following details:
```bash
Exception in comms call get_namespace_view:
File "/home/amin/mambaforge/lib/python3.9/site-packages/spyder_kernels/comms/commbase.py", line 314, in _comm_message
buffer = cloudpickle.loads(msg['buffers'][0],
ModuleNotFoundError: No module named 'torch'
Strangely, this only happens when I assign to variable, it doesn't happen if I just run torch.rand(5,5)
without assigning it.
@ccordoba12 or @impact27 do you know why this may be happening?
Hi @steff456, I just checked and I already had it installed. If it helps debugging the issue, I'm using a virtual env, which has
torch
installed, but Spyder itself is onbase
env, which doesn't have it installed.
So the variable explorer tries to load the torch object but can't because it is not installed in the frontend side. Do you see a crash or just an error?
Just in case, @ma-sadeghi checking the option Exclude unsupported data types
in the variable explorer options menu prevents the error dialog poping-up? If that is the case maybe this is related with https://github.com/spyder-ide/spyder/issues/16348 and then the error is not just within the installer but when using inside Spyder a custom interpreter with Pytorch
@impact27 It's just an error. @dalthviz Checking that option fixed the issue.
Description
What steps will reproduce the problem?
I was playing around w/ numpy and torch libraries that an error message popped up.
Traceback
Versions
Dependencies