0

I am learning python using Anaconda, Whenever I am trying to run spyder debug mode in Anaconda root env. I always get the following error message:

Traceback (most recent call last):

File "", line 1, in debugfile('/home/.../project2.py', wdir='/home/.../Project_2', post_mortem=True)

File "/home/Anaconda3/lib/python3.6/site-packages/spyder_kernels/customize/spydercustomize.py", line 809, in debugfile debugger.run("runfile(%r, args=%r, wdir=%r)" % (filename, args, wdir))

File "/home/Anaconda3/lib/python3.6/bdb.py", line 434, in run exec(cmd, globals, locals)

File "", line 1, in

File "/home/Anaconda3/lib/python3.6/site-packages/spyder_kernels/customize/spydercustomize.py", line 786, in runfile execfile(filename, namespace)

File "/home/Anaconda3/lib/python3.6/site-packages/spyder_kernels/customize/spydercustomize.py", line 110, in execfile exec(compile(f.read(), filename, 'exec'), namespace)

File "/home/.../project2.py", line 2, in import pandas as pd

File "/home/.../project2.py", line 2, in import pandas as pd

File "/home/Anaconda3/lib/python3.6/bdb.py", line 51, in trace_dispatch return self.dispatch_line(frame)

File "/home/Anaconda3/lib/python3.6/bdb.py", line 69, in dispatch_line self.user_line(frame)

File "/home/Anaconda3/lib/python3.6/pdb.py", line 261, in user_line self.interaction(frame, None)

File "/home/Anaconda3/lib/python3.6/site-packages/spyder_kernels/customize/spydercustomize.py", line 425, in interaction self._cmdloop()

File "/home/Anaconda3/lib/python3.6/site-packages/spyder_kernels/customize/spydercustomize.py", line 436, in _cmdloop self.cmdloop()

File "/home/Anaconda3/lib/python3.6/cmd.py", line 126, in cmdloop line = input(self.prompt)

File "/home/.../.local/lib/python3.6/site-packages/ipykernel/kernelbase.py", line 853, in raw_input password=False,

File "/home/.../.local/lib/python3.6/site-packages/ipykernel/kernelbase.py", line 863, in _input_request self.stdin_socket.recv_multipart(zmq.NOBLOCK)

File "/home/.../.local/lib/python3.6/site-packages/zmq/sugar/socket.py", line 467, in recv_multipart parts = [self.recv(flags, copy=copy, track=track)]

File "zmq/backend/cython/socket.pyx", line 788, in zmq.backend.cython.socket.Socket.recv

File "zmq/backend/cython/socket.pyx", line 824, in zmq.backend.cython.socket.Socket.recv

File "zmq/backend/cython/socket.pyx", line 191, in zmq.backend.cython.socket._recv_copy

File "zmq/backend/cython/socket.pyx", line 186, in zmq.backend.cython.socket._recv_copy

File "zmq/backend/cython/checkrc.pxd", line 19, in zmq.backend.cython.checkrc._check_rc

Again: Resource temporarily unavailable

I keep my Anaconda updated, but the debug mode runs normally in my another virtual env (my_env),

  • Ubuntu 18.04 LTS
  • root_env (python 3.6.8), my_env (python 3.7.2)
  • spyder: 3.3.3 (both)
  • IPython: 7.2.0

1 Answer 1

2

(Spyder maintainer here) Reading carefully your traceback, it seems you're mixing Anaconda packages with packages you installed in your home directory with pip. And those are incompatible for binary packages like pyzmq, the one generating the error.

So you need to remove this directory

~/.local/lib/python3.6/site-packages

to avoid the mixing and fix your problem.

Sign up to request clarification or add additional context in comments.

4 Comments

hello, just added the bug fix modification in the link you provided, but the problem is still there...
well, does that mean it will remove all packages installed with pip? I have some pip installed packages in root env and I need those packages
As I said, you can't mix binary pip and conda packages (like pyzmq). It's fine for pure Python packages though (like Flask). So it's up to you how to fix this problem.
If you consider my answer solved your problem (or help you to do it), please mark it as so by selecting the green check mark on the left.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.