fastthreadpool icon indicating copy to clipboard operation
fastthreadpool copied to clipboard

No module named Cython.Distutils

Open tysonite opened this issue 4 years ago • 2 comments

I am getting the following error when try to install fastthreadpool library from pypi. Suspect that setup.py does not have a dependency on Cython. If Cython installed prior to fastthreadpool, no error below happens.

$ pip install fastthreadpool
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Looking in indexes: https://pypi.org/simple
Collecting fastthreadpool
  Using cached fastthreadpool-1.7.0.tar.gz (14 kB)
    ERROR: Command errored out with exit status 1:
     command: /home/user/.virtualenvs/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-XYizvr/fastthreadpool/setup.py'"'"'; __file__='"'"'/tmp/pip-install-XYizvr/fastthreadpool/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-XYizvr/fastthreadpool/pip-egg-info
         cwd: /tmp/pip-install-XYizvr/fastthreadpool/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-XYizvr/fastthreadpool/setup.py", line 20, in <module>
        from Cython.Distutils import build_ext
    ImportError: No module named Cython.Distutils
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

tysonite avatar Mar 10 '21 19:03 tysonite

Hmm. It looks like https://github.com/brmmm3/fastthreadpool/blob/b7dc56d9b44b2d083724ba117de7e9c83a9ee9d4/setup.py#L129 has dependency on Cython. Not sure why it does not work for me...

tysonite avatar Mar 10 '21 21:03 tysonite

Hmm. It looks like

https://github.com/brmmm3/fastthreadpool/blob/b7dc56d9b44b2d083724ba117de7e9c83a9ee9d4/setup.py#L129 has dependency on Cython. Not sure why it does not work for me...

I always end up building from source when I use this in a project. Make sure g++ is installed in your system. Then: git clone https://github.com/brmmm3/fastthreadpool.git cd fastthreadpool pip3 install -r requirements.txt python3 setup.py install

gittrekt avatar Aug 12 '23 14:08 gittrekt