4

I have pip installed colorgram.py but I am still getting an error:

ModuleNotFoundError: No module named 'colorgram'

I have also created a path to the python location:

C:\Users\me\AppData\Local\Programs\Python\Python39

C:\Users\me\AppData\Local\Programs\Python\Python39/scripts

any idea how to fix this?

BigBalboa
  • 41
  • 1
  • 2

4 Answers4

3

I guess you've installed the module with a different python version than you have run it. To fix this you can run python -m pip install <the-name-of-the-module> and than run the script with python <path-to-your-script>. If you want to use python3 just replace all python with python3.

Gian Laager
  • 474
  • 4
  • 14
0

I ran into this same issue which brought me here.

I found a solution in my case. The package was installed, attempts to re-install said requirement already satisfied.

In my case the tool I was trying to use (pytest) was not installed in the venv but was installed in the path. Installing pytest into the same venv solved the issue.

bonkey
  • 11
  • 2
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 26 '22 at 16:35
0

same problem. Try to create a new project, it's probably you install colorgram.py after creating the project and the module is not contained in venv, installing colorgram.py from pycharm directly might help too.

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – user11717481 Sep 18 '22 at 22:26
0

I solved this issue recently by updating my $PYTHONPATH to match my site-packages. I couldn't use a module command from the commandline (e.g. ModuleNotFoundError: No module named 'onelogin_aws_cli')

  1. When you pip install the Module, note where it's already installed (e.g. Requirement already satisfied: onelogin-aws-cli==0.1.6 in ./venv/lib/python3.9/site-packages (0.1.6))
  2. Set your Python path to the location of the site packages (e.g. export $PYTHONPATH=./venv/lib/python3.9/site-packages)

I was then able to use the onelogin_aws_cli command from the commandline.

Josh Graham
  • 123
  • 6