19

I get this warning while running a python program (some basic web automation using selenium):

warning: Debugger speedups using cython not found. Run '"/usr/bin/python3.5" "/root/.p2/pool/plugins/org.python.pydev_4.5.5.201603221110/pysrc/setup_cython.py" build_ext --inplace' to build. pydev debugger: starting (pid: 3502)

How can I address this issue?

Clone
  • 3,378
  • 11
  • 25
  • 41
  • Would need to see the code behind this. – Paul Williams Apr 17 '16 at 20:43
  • How much is the speedup anyway, and do we care on a small program? It's yet another Eclipse annoyance that this isn't hidden/ defaulted / presented as an option on Debug mode, rather than a warning in the console. – smci Nov 03 '17 at 21:43

9 Answers9

13

This is as expected. Run"/usr/bin/python3.5" "/root/.p2/pool/plugins/org.python.pydev_4.5.5.201603221110/pysrc/setup_cython.py" build_ext --inplace as it asks to get the debugger accelerations.

(Nb. The error in the comment below was because this answer was missing an initial double quote.)

Ideally run it from within your virtual environment, if you use one, to make sure you run this for the correct Python version. You'll need to run this once per Python version you use.

Chris
  • 5,664
  • 6
  • 44
  • 55
Fabio Zadrozny
  • 24,814
  • 4
  • 66
  • 78
  • 1
    Where should I run that? I just get a `>` when I run it in terminal. – Clone Apr 18 '16 at 18:22
  • In windows 7, 64 bit, I get a module import error: ` C:\Windows\system32>"C:\Python33\python.exe" "C:\Users\user\.p2\pool\plugins\org.python.pydev_5.2.0.201608171824\pysrc\setup_cython.py" build_ext --inplace Traceback (most recent call last): File "C:\Users\user\.p2\pool\plugins\org.python.pydev_5.2.0.201608171824\pysrc\setup_cython.py", line 25, in from setuptools import setup ImportError: No module named 'setuptools' C:\Windows\system32>` – MasterJoe Oct 04 '16 at 20:45
  • Try running `pip install setuptools` and re-running your command (new Python versions have it builtin, on old versions, it may have to be installed). – Fabio Zadrozny Oct 05 '16 at 10:27
  • In case you tried to run it, but got "**pydevd_cython.c:17:20: fatal error: Python.h: No such file or directory**", make sure to install python-dev initially, e.g. `sudo yum install python36-devel` – Noam Manos Apr 15 '19 at 11:02
5

simply copy all the command "/usr/bin/python3.5" "/root/.p2/pool/plugins/org.python.pydev_4.5.5.201603221110/pysrc/setup_cython.py" build_ext --inplace ,

paste in a command line terminal (tipically bash shell) and press return :)

  • This command is most probably out of date: python3.8 or python3.9 as is pydev_4.5.5.2016... – c05772 Jun 08 '22 at 20:40
3

Installing PyDev plugin in eclipse doesn't enough to run python (*.py) file. This error will come if Microsoft Visual C++ Compiler for Python 2.7 is not installed, So if you look error message in eclipse console there you can find a link how to install this python compiler, what you can simply do is,

1.Download Microsoft Visual C++ Compiler for Python 2.7 from http://aka.ms/vcpython27

2.Install downloaded package (.msi)

3.Go to command prompt in windows and change directory to "cd python27"

4.Run C:\Users\xyz\<path to you eclipse plugins> \org.python.pydev.core_6.3.2.201803171248\pysrc\setup_cython.py build_ext --inplace

5.Hit enter and wait unless compiler plugin install.

Voila! You have now installed python compiler.

Hope so It will help you. In my case it worked. Thanks!!!

BlackBeard
  • 10,246
  • 7
  • 52
  • 62
1

I faced a similar issue while using Python3.5 and Eclipse Pydev for debugging. when I tried

>"/usr/bin/python3.5" "/home/frodo/eclipse/plugins/org.python.pydev.core_6.3.3.201805051638/pysrc/setup_cython.py" build_ext --inplace

Traceback (most recent call last): File "/home/frodo/eclipse/plugins/org.python.pydev.core_6.3.3.201805051638/pysrc/setup_cython.py", line 14, in from setuptools import setup ImportError: No module named 'setuptools'

Later I fixed the issue with the below commands to install setuptools and the related python3-dev libraries using

sudo apt-get install python3-setuptools python3-dev

and that resolved the issues while executing the above command.

Sethu S
  • 89
  • 4
1

I got a similar warning on Windows using PyDev in Eclipse 09-2021 and Python 3.10.
To resolve it, open the Command Prompt (e.g. type cmd in Search) and run the command from the warning message.
For example: "C:\Users\TestUser\AppData\Local\Programs\Python\Python310\python.exe" "D:\eclipse\plugins\org.python.pydev.core_9.0.0.202108151241\pysrc\setup_cython.py" build_ext --inplace

You need to have Microsoft C++ Build Tools 14.0 installed, otherwise it will exit with an error message asking to install it. Run the installer, tick the checkbox near "C++ build tools" and then install. Reboot and run the command again. It should build the Cython extension successfully. Debugging Python projects will be faster after that.

AlexF
  • 399
  • 4
  • 9
0

I use python 3.3 interpreter, pydev and eclipse neon on Windows 7, 64 bit. I got the error:

warning: Debugger speedups using cython not found. Run '"C:\Python33\python.exe" "C:\Users\user\.p2\pool\plugins\org.python.pydev_5.2.0.201608171824\pysrc\setup_cython.py" build_ext --inplace' to build. pydev debugger: starting (pid: 8252)

I am working on the solution now. This is an INCOMPLETE answer.

  1. Look at the python file mentioned in the error. Open it in a text editor like notepad++ & read the comments. Looks like we have to run this python script using python setup_cython build_ext --inplace. You must add .py after setup_cython to make this command work in windows.

To run this command, open cmd as administrator and then CD into the folder where the setup_cython script is stored (see it in error message). Then, run: python setup_cython.py build_ext --inplace. Btw, if you get an error python is not recognized as an internal or external command, then refer this.

  1. Then, I got an error:

    Traceback (most recent call last): File "setup_cython.py", line 25, in from setuptools import setup ImportError: No module named 'setuptools'

Looks like setuptools is missing and must be installed. Refer this link. We will use the simplified windows instructions. Download the ez_setup.py script in any folder. Open cmd as administrator and then cd into that folder. Then run python ez_setup.py

  1. Now, it will install a lot of files as part of setup tools. After completion, run the setup_cython script using python setup_cython.py build_ext --inplace. I got the error:

running build_ext building '_pydevd_bundle.pydevd_cython' extension error: INCLUDE environment variable is empty

Let me see what to do next.

Community
  • 1
  • 1
MasterJoe
  • 2,103
  • 5
  • 32
  • 58
0

On ubuntu, I needed to do the following in a terminal:

  1. sudo apt-get install build-essential
  2. sudo apt-get install python3-dev

I then copied the full setup path from the error in eclipse and onto my command prompt: python "/home/mark/.eclipse/360744347_linux_gtk_x86_64/plugins/org.python.pydev.core_6.5.0.201809011628/pysrc/setup_cython.py" build_ext --inplace

It finally compiled and the error message no longer appears.

Mark Warburton
  • 471
  • 10
  • 18
0

GNU/Linux / Eclipse 2021-06 / Python 3.6.9, cython installed with apt install cython

Localization of setup_cython.py: find <eclipse binary installation> -name setup_cython.py

Execution : python3 "<previous find result>" build_ext --inplace

That's all folks!

Aubin
  • 14,617
  • 9
  • 61
  • 84
-1

with py 3.7 this does not build. but then, you just lose some speed-ups, not a big deal.

you get :

usr/local/bin/python3.7    ./setup_cython.py   build_ext --inplace
running build_ext
building '_pydevd_bundle.pydevd_cython' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/python3.7m -c _pydevd_bundle/pydevd_cython.c -o build/temp.linux-x86_64-3.7/_pydevd_bundle/pydevd_cython.o
_pydevd_bundle/pydevd_cython.c: In function ‘__Pyx__ExceptionSave’:
_pydevd_bundle/pydevd_cython.c:28837:19: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’; did you mean ‘curexc_type’?
     *type = tstate->exc_type;
LuFFy
  • 8,799
  • 10
  • 41
  • 59
dotbit
  • 4,445
  • 1
  • 7
  • 8