Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No module named Cython.Distutils #2

Open
tysonite opened this issue Mar 10, 2021 · 2 comments
Open

No module named Cython.Distutils #2

tysonite opened this issue Mar 10, 2021 · 2 comments

Comments

@tysonite
Copy link

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
Copy link
Author

Hmm. It looks like

cmdclass={'build_ext': build_ext_subclass}, install_requires=['Cython'],
has dependency on Cython. Not sure why it does not work for me...

@gittrekt
Copy link

gittrekt commented Aug 12, 2023

Hmm. It looks like

cmdclass={'build_ext': build_ext_subclass}, install_requires=['Cython'],

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants