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 "setuptools" #720

Closed
suhascv opened this issue Feb 24, 2021 · 14 comments · Fixed by #726
Closed

No module named "setuptools" #720

suhascv opened this issue Feb 24, 2021 · 14 comments · Fixed by #726

Comments

@suhascv
Copy link

suhascv commented Feb 24, 2021

Error while installing requirements from toolkit

pip3 install -r requirements.txt

Screenshot from 2021-02-24 10-00-13

I get the same error even after

pip3 install setuptools
Requirement already satisfied: setuptools in

@Nolski

@suhascv
Copy link
Author

suhascv commented Feb 24, 2021

The following changes in pyproject.toml solved the issue

[build-system]
requires = ["poetry-core>=1.0.0",
            "setuptools>=30.3.0,<50"
]

@sduenas
Copy link
Member

sduenas commented Feb 24, 2021

Thanks! Would you mind to create a PR to fix it?

@suhascv
Copy link
Author

suhascv commented Feb 24, 2021

sure
need to make the above changes to both perceval repo and toolkit repo
created PRs
perceval PR
toolkit PR

@vchrombie
Copy link
Member

Hi @suhascv @Nolski, thanks for your interest in GrimoireLab. Sorry for popping in late.

I think we have faced this issue earlier and we found a workaround for it. We are using the same workaround in the CI workflow too.

It is always advised to use a virtual environment, in case if you aren't using one.

mkdir venv && python -m venv venv && source venv/bin/activate

Installing perceval from source code

git clone https://github.com/chaoss/grimoirelab-perceval.git
cd grimoirelab-perceval
pip install --upgrade pip==18.1 setuptools==49.6 wheel
pip install -r requirements.txt
pip install .
perceval --list

@suhascv, can you try this and let us know if this solves the issue?

If we still want to proceed with adding setuptools to the requirements and poetry configuration, we need to make sure it doesn't affect any other tools, and also maybe we need to update the github actions workflows too. I can help with testing that.
@sduenas, do you have any thoughts?

@suhascv
Copy link
Author

suhascv commented Feb 25, 2021

@vchrombie thanks for your response, I followed the above procedure using virtual environment, I still got the same error. It seems like this is the issue here.

@vchrombie
Copy link
Member

Hi @suhascv

@vchrombie thanks for your response, I followed the above procedure using virtual environment, I still got the same error. It seems like this is the issue here.

Strange, I have tested the steps just now and it works really fine for me.

git clone https://github.com/chaoss/grimoirelab-perceval.git
cd grimoirelab-perceval
pip install --upgrade pip==18.1 setuptools==49.6 wheel
pip install -r requirements.txt
pip install .
perceval --list

Do you mind sharing any error log you have?

Just a small trivia, you can try python setup.py install instead of pip install ..

Also, are you interested to try the developer installation of grimoirelab? I understand you are working with only perceval right now, but this can very much helpful. I can help you with the setup if needed.

@vchrombie
Copy link
Member

@suhascv do you have doubts or update about the installation?
Let me know if you need help.

@vchrombie
Copy link
Member

@suhascv can we close this issue for now?

We, right now, need to downgrade the version of the setuptools as a workaround but I am hoping this error would be resolved in the coming version of setuptools.

If it didn't, I will try to implement the changes which you have proposed. But, I need to evaluate if this is needed for all the grimoirelab tools.

@suhascv
Copy link
Author

suhascv commented Mar 5, 2021

@vchrombie you can close this issue.

@suhascv suhascv closed this as completed Mar 5, 2021
@sduenas
Copy link
Member

sduenas commented Mar 8, 2021

I've been facing the same problems @suhascv had. I think we should add it to avoid the problem while the issue with setuptools is fixed.

@vchrombie
Copy link
Member

I've been facing the same problems @suhascv had. I think we should add it to avoid the problem while the issue with setuptools is fixed.

Okay @sduenas, I will follow up on this PR #721 and check if other grimoirelab components need this change.

@rohanreddych
Copy link

Hello, I followed suhascv's tip and put requires = ["poetry-core>=1.0.0","setuptools>=30.3.0,<50"] in pyproject.toml but it still gave an error.

Running setup.py develop for grimoirelab-toolkit
    ERROR: Command errored out with exit status 1:
     command: /mnt/c/Users/rohan/workspace/chaoss/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/mnt/c/Users/rohan/workspace/chaoss/venv/src/grimoirelab-toolkit/setup.py'"'"'; __file__='"'"'/mnt/c/Users/rohan/workspace/chaoss/venv/src/grimoirelab-toolkit/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps
         cwd: /mnt/c/Users/rohan/workspace/chaoss/venv/src/grimoirelab-toolkit/
    Complete output (3 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ModuleNotFoundError: No module named 'setuptools'
    ----------------------------------------
ERROR: Command errored out with exit status 1: /mnt/c/Users/rohan/workspace/chaoss/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/mnt/c/Users/rohan/workspace/chaoss/venv/src/grimoirelab-toolkit/setup.py'"'"'; __file__='"'"'/mnt/c/Users/rohan/workspace/chaoss/venv/src/grimoirelab-toolkit/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.

I created a new virtualenv and tried again, but same error. Any fix for this error?

@vchrombie
Copy link
Member

vchrombie commented Mar 15, 2021

Hi @rohanreddych, thanks for your interest in GrimoireLab.

Hello, I followed suhascv's tip and put requires = ["poetry-core>=1.0.0","setuptools>=30.3.0,<50"] in pyproject.toml but it still gave an error.

Okay, I haven't really tried that solution but it should solve the problem.
Have you installed setuptools after adding them to the pyproject.toml. You can install it using pip. Ideally this should be added to requirements.txt file.

$ pip install -r setuptools>=30.3.0,<50

I will check this soon and provide the required PR.

You can also try the steps given in this chaoss/grimoirelab-perceval#720 (comment). This is a workaround which we are currently using now.

Let us know if you need any help.

@suhascv
Copy link
Author

suhascv commented Mar 15, 2021

Hello, I followed suhascv's tip and put requires = ["poetry-core>=1.0.0","setuptools>=30.3.0,<50"] in pyproject.toml but it still gave an error.

Running setup.py develop for grimoirelab-toolkit
    ERROR: Command errored out with exit status 1:
     command: /mnt/c/Users/rohan/workspace/chaoss/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/mnt/c/Users/rohan/workspace/chaoss/venv/src/grimoirelab-toolkit/setup.py'"'"'; __file__='"'"'/mnt/c/Users/rohan/workspace/chaoss/venv/src/grimoirelab-toolkit/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps
         cwd: /mnt/c/Users/rohan/workspace/chaoss/venv/src/grimoirelab-toolkit/
    Complete output (3 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ModuleNotFoundError: No module named 'setuptools'
    ----------------------------------------
ERROR: Command errored out with exit status 1: /mnt/c/Users/rohan/workspace/chaoss/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/mnt/c/Users/rohan/workspace/chaoss/venv/src/grimoirelab-toolkit/setup.py'"'"'; __file__='"'"'/mnt/c/Users/rohan/workspace/chaoss/venv/src/grimoirelab-toolkit/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.

I created a new virtualenv and tried again, but same error. Any fix for this error?

@rohanreddych I think you need to update pyproject.toml on two repos

  1. perceval
  2. toolkit

I forked both these repos and updated pyproject.toml, it worked for me.

@suhascv suhascv reopened this Mar 15, 2021
vchrombie added a commit to vchrombie/grimoirelab-toolkit that referenced this issue Apr 6, 2021
This commit adds the setuptools version to the
poetry setup configurations. This is needed to
fix the 'No module named "setuptools"' bug.

chaoss/grimoirelab-perceval#720
vchrombie added a commit to vchrombie/grimoirelab-toolkit that referenced this issue Apr 6, 2021
This commit adds the setuptools version to the
poetry setup configurations. This is needed to
fix the 'No module named "setuptools"' bug.

chaoss/grimoirelab-perceval#720
vchrombie added a commit to vchrombie/grimoirelab-toolkit that referenced this issue Apr 7, 2021
This commit adds the setuptools version to the
poetry setup configurations. This is needed to
fix the 'No module named "setuptools"' bug.

chaoss/grimoirelab-perceval#720

Signed-off-by: Venu Vardhan Reddy Tekula <venu@bitergia.com>
vchrombie added a commit to vchrombie/grimoirelab-perceval that referenced this issue Apr 7, 2021
This commit adds the setuptools version to the
poetry setup configurations. This is needed to
fix the 'No module named setuptools' bug.

chaoss#720

Signed-off-by: Venu Vardhan Reddy Tekula <venu@bitergia.com>
vchrombie added a commit to vchrombie/grimoirelab-perceval that referenced this issue Apr 7, 2021
This commit adds the setuptools version to the
poetry setup configurations. This is needed to
fix the 'No module named "setuptools"' bug.

chaoss#720

Signed-off-by: Venu Vardhan Reddy Tekula <venu@bitergia.com>
vchrombie added a commit to vchrombie/grimoirelab-perceval that referenced this issue Apr 19, 2021
This commit adds the setuptools version to the
poetry setup configurations. This is needed to
fix the 'No module named "setuptools"' bug.

chaoss#720

Signed-off-by: Venu Vardhan Reddy Tekula <venu@bitergia.com>
lfpratik pushed a commit to lfpratik/grimoirelab-perceval that referenced this issue Jun 21, 2021
This commit adds the setuptools version to the
poetry setup configurations. This is needed to
fix the 'No module named "setuptools"' bug.

chaoss#720

Signed-off-by: Venu Vardhan Reddy Tekula <venu@bitergia.com>
Signed-off-by: lfpratik <pratikkaranje03@gmail.com>
sammonsjl pushed a commit to sammonsjl/grimoirelab-perceval that referenced this issue Jun 22, 2021
This commit adds the setuptools version to the
poetry setup configurations. This is needed to
fix the 'No module named "setuptools"' bug.

chaoss#720

Signed-off-by: Venu Vardhan Reddy Tekula <venu@bitergia.com>
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

Successfully merging a pull request may close this issue.

4 participants