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

Display error message "ModuleNotFoundError: No module named 'setuptools.command.test'" when instanlling #775

Closed
liangrongze opened this issue Jul 30, 2024 · 3 comments
Labels
question Further information is requested

Comments

@liangrongze
Copy link

What is your question?

After reading the documentation, I am still not clear how to get X working. I tried this, this, and that.

@liangrongze liangrongze added the question Further information is requested label Jul 30, 2024
@liangrongze liangrongze changed the title Display error message "ModuleNotFoundError: No module named 'setuptools.command.test'" when instan Display error message "ModuleNotFoundError: No module named 'setuptools.command.test'" when instanlling Jul 30, 2024
@liangrongze
Copy link
Author

I am new to this project. My machine's system is Debian 10. It is a new machine.

Here are my steps.

apt-get install git
Clone Fabric to your computer
git clone https://github.com/danielmiessler/fabric.git
cd fabric
apt install pipx
pipx install .

Then the following messages are displayed:

image

I had installed the setuptools package.

image

I used ChatGPT to fix it many times, but it also failed.

image image

Can you help me?

@liangrongze
Copy link
Author

Newest important information

It seems that their package is broken. This is because in setup.py they are doing

from setuptools.command.test import test as TestCommand
but setuptools.command.test was removed on 28 Jul 2024 (yesterday): https://setuptools.pypa.io/en/stable/history.html#v72-0-0

Here's a similar issue on the official GitHub repo: pypa/setuptools#4519

@liangrongze
Copy link
Author

Fixed it.

First install poetry and check your setuptools version.

curl -sSL https://install.python-poetry.org | python3 -

image

export PATH="$HOME/.local/bin:$PATH"
source ~/.bashrc # or source ~/.zshrc
poetry --version

image

poetry show setuptools

image

cd /yourpath/fabric # goto fabric directory
vim pyproject.toml # add vim pyproject.toml under [tool.poetry.dependencies]

image

poetry update setuptools # update setuptools to older version

image

poetry show setuptools

image

pipx install .

image

done !

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

No branches or pull requests

2 participants