klebgenomics/Kleborate

No module named 'distutils'

Closed this issue · 0 comments

How to reproduce

  • Install pixi
  • Create a pixi environment with pixi init
  • Check out Kleborate master
  • Start the pixi shell with pixi shell in the kleborate folder
  • Add python and the biopython requirement with pixi add python
  • Add the requirements from requirements.txt e.g. with for r in $(cat requirements.txt); do pixi add $r; done
  • Try to run python setup.py or python kleborate-runner.py

Results

$ python kleborate-runner.py 
Traceback (most recent call last):
  File "/home/shl/proj/24/50-klebsiella-hyper/kleborate/kleborate-runner.py", line 18, in <module>
    from kleborate.__main__ import main
  File "/home/shl/proj/24/50-klebsiella-hyper/kleborate/kleborate/__main__.py", line 16, in <module>
    import distutils.spawn
ModuleNotFoundError: No module named 'distutils'
$ python setup.py 
/home/shl/proj/24/50-klebsiella-hyper/kleborate/setup.py:89: SyntaxWarning: invalid escape sequence '\ '
  "| | / /| |   |  ____|  _ \ / __ \|  __ \   /\|__   __|  ____|\n" \
/home/shl/proj/24/50-klebsiella-hyper/kleborate/setup.py:90: SyntaxWarning: invalid escape sequence '\ '
  "| |/ / | |   | |__  | |_) | |  | | |__) | /  \  | |  | |__   \n" \
/home/shl/proj/24/50-klebsiella-hyper/kleborate/setup.py:91: SyntaxWarning: invalid escape sequence '\ '
  "|   <  | |   |  __| |  _ <| |  | |  _  / / /\ \ | |  |  __|  \n" \
/home/shl/proj/24/50-klebsiella-hyper/kleborate/setup.py:92: SyntaxWarning: invalid escape sequence '\ '
  "| |\ \ | |___| |____| |_) | |__| | | \ \/ ____ \| |  | |____ \n" \
/home/shl/proj/24/50-klebsiella-hyper/kleborate/setup.py:93: SyntaxWarning: invalid escape sequence '\_'
  "|_| \_\|_____|______|____/ \____/|_|  \_\/    \_\_|  |______|\n"
Traceback (most recent call last):
  File "/home/shl/proj/24/50-klebsiella-hyper/kleborate/setup.py", line 19, in <module>
    import distutils.spawn
ModuleNotFoundError: No module named 'distutils'

(Above are some additional warnings, but will open a separate issue for that).

Expected result

  • Expected no errors

Suggested fix

  • Add setuptools to requirements.txt

System info

  • OS: Linux Mint 21.1
  • Python version: 3.12.4