question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PyTorch Internal Error

See original GitHub issue

Description

What steps will reproduce the problem?

I have created a virtual environment and installed PyTorch library there. When I execute the statements

import torch
x = torch.rand(3)

the code works, and output is displayed but this internal error keeps popping up. I don’t know what’s the issue.

Traceback

Exception in comms call get_namespace_view:
  File "D:\Anaconda\lib\site-packages\spyder_kernels\comms\commbase.py", line 314, in _comm_message
    buffer = cloudpickle.loads(msg['buffers'][0],
ModuleNotFoundError: No module named 'torch'

Versions

  • Spyder version: 5.1.5
  • Python version: 3.9.12
  • Qt version: 5.9.7
  • PyQt5 version: 5.9.2
  • Operating System: Windows 10

Dependencies


# Mandatory:
atomicwrites >=1.2.0          :  1.4.0 (OK)
chardet >=2.0.0               :  4.0.0 (OK)
cloudpickle >=0.5.0           :  2.0.0 (OK)
cookiecutter >=1.6.0          :  1.7.3 (OK)
diff_match_patch >=20181111   :  20200713 (OK)
intervaltree >=3.0.2          :  3.1.0 (OK)
IPython >=7.6.0               :  8.2.0 (OK)
jedi >=0.17.2;<0.19.0         :  0.18.1 (OK)
jsonschema >=3.2.0            :  4.4.0 (OK)
keyring >=17.0.0              :  23.4.0 (OK)
nbconvert >=4.0               :  6.4.4 (OK)
numpydoc >=0.6.0              :  1.2 (OK)
paramiko >=2.4.0              :  2.8.1 (OK)
parso >=0.7.0;<0.9.0          :  0.8.3 (OK)
pexpect >=4.4.0               :  4.8.0 (OK)
pickleshare >=0.4             :  0.7.5 (OK)
psutil >=5.3                  :  5.8.0 (OK)
pygments >=2.0                :  2.11.2 (OK)
pylint >=2.5.0;<2.10.0        :  2.9.6 (OK)
pyls_spyder >=0.4.0           :  0.4.0 (OK)
pylsp >=1.2.2;<1.3.0          :  1.2.4 (OK)
pylsp_black >=1.0.0           :  None (OK)
qdarkstyle =3.0.2             :  3.0.2 (OK)
qstylizer >=0.1.10            :  0.1.10 (OK)
qtawesome >=1.0.2             :  1.0.3 (OK)
qtconsole >=5.1.0             :  5.3.0 (OK)
qtpy >=1.5.0                  :  2.0.1 (OK)
rtree >=0.9.7                 :  0.9.7 (OK)
setuptools >=49.6.0           :  61.2.0 (OK)
sphinx >=0.6.6                :  4.4.0 (OK)
spyder_kernels >=2.1.1;<2.2.0 :  2.1.3 (OK)
textdistance >=4.2.0          :  4.2.1 (OK)
three_merge >=0.1.1           :  0.1.1 (OK)
watchdog >=0.10.3             :  2.1.6 (OK)
zmq >=17                      :  22.3.0 (OK)

# Optional:
cython >=0.21                 :  0.29.28 (OK)
matplotlib >=2.0.0            :  3.5.1 (OK)
numpy >=1.7                   :  1.21.5 (OK)
pandas >=1.1.1                :  1.4.2 (OK)
scipy >=0.17.0                :  1.7.3 (OK)
sympy >=0.7.3                 :  1.10.1 (OK)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Swarna2001commented, Aug 5, 2022

@dalthviz Thank you so much. The wiki helped a lot, and now everything is working perfectly. Thanks once again 😃

0reactions
dalthvizcommented, Aug 5, 2022

Awesome! Glad to hear that you got Spyder working! I will close this issue as duplicate then but if you have more questions let us know in a new issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

RuntimeError: NCCL Error 3: internal error - PyTorch Forums
Hi, I am using DataParallel in a SGE enviroment with cudatoolkit 10.1 and NCCL version 2.7. I get the following error
Read more >
sparse.mm: CUDA error: internal error when calling ... - GitHub
Consider the following script: A = torch.sparse_coo_tensor( indices=[ [1500, 1505, 1506], [8347, 8347, 8347], ], values = [1., 1., 1.]
Read more >
Pytorch Model causing 500 server error in Django App
This is causing my app to return a 500 server error when hitting that URL; I know the model is causing it because...
Read more >
Inference in TensorRT error due to F.pad : IShuffleLayer ...
Description I converted an Pytorch model in ONNX. ... Error Code 4: Internal Error (Reshape_172: IShuffleLayer applied to shape tensor must ...
Read more >
MSVC 2022 Preview (4) crashes when compiling PyTorch ...
C:\Users\nickkreeger\workspace\pytorch\caffe2\operators\bbox_transform_op.h(37): fatal error C1001: Internal compiler error. ... To work around this problem, try ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found