Qix-/better-exceptions

ModuleNotFoundError: No module named 'colorama'

Oxicode opened this issue · 6 comments

Hello @Oxicode.

Did you get thiss error while trying better_exceptions after a fresh install, or did it just pop out while you was using the package for some time?
Did you install better_exceptions using the pip command?
Also, could you please tell me the output of this command in your terminal (trying to get some information about your Python environment):

python -c "import sys; print(sys.platform); print(sys.version); import distutils; print(distutils.__version__); import setuptools; print(setuptools.__version__)"

I guess the obvious solution is to pip install colorama, but you could also try pip uninstall better_exceptions and then pip install better_exceptions to see if this installation issue is reproducible.

I get this error after install via PIP (new instalation)

Output command:

Remainder of file ignored
win32
3.6.2 (v3.6.2:5fd33b5, Jul  8 2017, 04:57:36) [MSC v.1900 64 bit (AMD64)]
3.6.2
40.4.3

@Oxicode Thanks for the answers. I don't understand why it doesn't work. 😕

Can you please try to uninstall better_exceptions, and re-install it with verbose options, so maybe it will output something interesting.

pip uninstall better_exceptions colorama
pip install -vvv better_exceptions

@Oxicode Thanks for the answers. I don't understand why it doesn't work. 😕

Can you please try to uninstall better_exceptions, and re-install it with verbose options, so maybe it will output something interesting.

pip uninstall better_exceptions colorama
pip install -vvv better_exceptions
Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
Created temporary directory: C:\Users\juaquisp\AppData\Local\Temp\pip-ephem-wheel-cache-ckhtxqg5
Created temporary directory: C:\Users\juaquisp\AppData\Local\Temp\pip-req-tracker-aim03qix
Created requirements tracker 'C:\\Users\\juaquisp\\AppData\\Local\\Temp\\pip-req-tracker-aim03qix'
Created temporary directory: C:\Users\juaquisp\AppData\Local\Temp\pip-install-_dx2rluk
Collecting better_exceptions
  1 location(s) to search for versions of better-exceptions:
  * https://pypi.org/simple/better-exceptions/
  Getting page https://pypi.org/simple/better-exceptions/
  Looking up "https://pypi.org/simple/better-exceptions/" in the cache
  Request header has "max_age" as 0, cache bypassed
  Starting new HTTPS connection (1): pypi.org:443
  Incremented Retry for (url='/simple/better-exceptions/'): Retry(total=4, connect=None, read=None, redirect=None, status=None)

  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(10054, 'Se ha forzado la interrupción de una conexión existente por el host remoto', None, 10054, None))': /simple/better-exceptions/
  Starting new HTTPS connection (2): pypi.org:443
  https://pypi.org:443 "GET /simple/better-exceptions/ HTTP/1.1" 304 0
  Analyzing links from page https://pypi.org/simple/better-exceptions/
    Found link https://files.pythonhosted.org/packages/fb/bf/c07668de6f6e3b3122dd65c6bf39baa4d7daa2c53692168f780bb4046ce2/better_exceptions-0.1.0.tar.gz#sha256=3e42d6012e2e7aef130543320030881e2a3b1d80d5f8ff5df4c3435c771ea5f8 (from https://pypi.org/simple/better-exceptions/), version: 0.1.0
    Found link https://files.pythonhosted.org/packages/38/b0/aa0c2974ca220aa78b4eb0265fab8fe7199f56288a649e57dcaf618c4b73/better_exceptions-0.1.1.tar.gz#sha256=ed1d61092c69e28b464b667622e35bd7a5e57160601903755b5c7260316dc3e8 (from https://pypi.org/simple/better-exceptions/), version: 0.1.1
    Found link https://files.pythonhosted.org/packages/1a/fd/dcb6ed5dfb5d622cd375a1fd3aa2997ee09f0e7c541281097017a2120a9e/better_exceptions-0.1.2.tar.gz#sha256=f4092ea2a04f8ddb7c0ba94e847e980be1eeb05815cd50b9acafcca0ed72cb73 (from https://pypi.org/simple/better-exceptions/), version: 0.1.2
    Found link https://files.pythonhosted.org/packages/8d/08/70174ec390da0c6bf4ecd96ca20ed9298d540f8a4558cb0eae4802eed02a/better_exceptions-0.1.3.tar.gz#sha256=2307958cf527940e85d40a4c8c9c8fd7f3043c6a46a75249d0e7a109f2ab96ca (from https://pypi.org/simple/better-exceptions/), version: 0.1.3
    Found link https://files.pythonhosted.org/packages/b4/cd/b5bb4e7ecbb47188d60eb7e1eb65ec62cdd904ec681f91b5c3a9d8761849/better_exceptions-0.1.4.tar.gz#sha256=3f9116e3f62ecf6d5089781ade56970989e4bd938f0a9a5d3d3a6f1d1d932829 (from https://pypi.org/simple/better-exceptions/), version: 0.1.4
    Found link https://files.pythonhosted.org/packages/b4/45/fcbfb3eba682c1f6416fc55a23e35d86fe5dea56bb419bf627ba0ac1fb7f/better_exceptions-0.1.5.tar.gz#sha256=6d3ae99beea2a8317a894656d9e8e668934d9f913eb5525635a9b8847451ec10 (from https://pypi.org/simple/better-exceptions/), version: 0.1.5
    Found link https://files.pythonhosted.org/packages/66/38/7b2f2f7b8c04357fbf141f3726a87ad29efb7210a78955fc8c0da135b53b/better_exceptions-0.1.6.tar.gz#sha256=fca53befb27bf17190625fd52287c6f6ba67679b7c655b5d7de2178820f06c9f (from https://pypi.org/simple/better-exceptions/), version: 0.1.6
    Found link https://files.pythonhosted.org/packages/fb/23/e409d0011a0c516f1af2d349a23ec89b43f62edc0264f9e8546da0896481/better_exceptions-0.1.7.tar.gz#sha256=d63c20af1d9623ce922bf424eda35d8cd3095341e2ee9019b7bea976547a7cf4 (from https://pypi.org/simple/better-exceptions/), version: 0.1.7
    Found link https://files.pythonhosted.org/packages/b4/b7/fb141cd93fd83188deb0e29aedd834e0f0e2c1a9d249aabf7b666a9be9c7/better_exceptions-0.1.8.tar.gz#sha256=c53b1ad6419f305a889b3f1c68ea82f41cf40b1a33665d3a72bd20c0801ab404 (from https://pypi.org/simple/better-exceptions/), version: 0.1.8
    Found link https://files.pythonhosted.org/packages/f3/18/4870e5e96849df6dfe1ca2c8cecfd1cbd0a5572d4dc930b49b4b19824f6b/better_exceptions-0.2.1.tar.gz#sha256=0a73efef96b48f867ea980227ac3b00d36a92754e6d316ad2ee472f136014580 (from https://pypi.org/simple/better-exceptions/), version: 0.2.1
    Found link https://files.pythonhosted.org/packages/e8/cd/26f11b8e0c3d96cfe55452ac365d8aad369b341e42548378158221b44c29/better_exceptions-0.2.2-py3-none-any.whl#sha256=bf79c87659bc849989d726bf0e4a2100edefe7eded112d201f54fe08467fdf63 (from https://pypi.org/simple/better-exceptions/), version: 0.2.2
    Found link https://files.pythonhosted.org/packages/d8/e7/97eec3a79628b3d6309dc0955ac6798b1093c13bd4f4563fe99eb543c5ac/better_exceptions-0.2.2.tar.gz#sha256=c196cad849de615abb9f6eb67ca1b83f33b938818f0e2fe8fa157b22aeb7b992 (from https://pypi.org/simple/better-exceptions/), version: 0.2.2
  Using version 0.2.2 (newest of versions: 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.7, 0.1.8, 0.2.1, 0.2.2)
  Created temporary directory: C:\Users\juaquisp\AppData\Local\Temp\pip-unpack-t6zyhtnd
  Looking up "https://files.pythonhosted.org/packages/e8/cd/26f11b8e0c3d96cfe55452ac365d8aad369b341e42548378158221b44c29/better_exceptions-0.2.2-py3-none-any.whl" in the cache
  Current age based on date: 301492
  Ignoring unknown cache-control directive: immutable
  Freshness lifetime from max-age: 365000000
  The response is "fresh", returning cached response
  365000000 > 301492
  Using cached https://files.pythonhosted.org/packages/e8/cd/26f11b8e0c3d96cfe55452ac365d8aad369b341e42548378158221b44c29/better_exceptions-0.2.2-py3-none-any.whl
  Downloading from URL https://files.pythonhosted.org/packages/e8/cd/26f11b8e0c3d96cfe55452ac365d8aad369b341e42548378158221b44c29/better_exceptions-0.2.2-py3-none-any.whl#sha256=bf79c87659bc849989d726bf0e4a2100edefe7eded112d201f54fe08467fdf63 (from https://pypi.org/simple/better-exceptions/)
  Added better_exceptions from https://files.pythonhosted.org/packages/e8/cd/26f11b8e0c3d96cfe55452ac365d8aad369b341e42548378158221b44c29/better_exceptions-0.2.2-py3-none-any.whl#sha256=bf79c87659bc849989d726bf0e4a2100edefe7eded112d201f54fe08467fdf63 to build tracker 'C:\\Users\\juaquisp\\AppData\\Local\\Temp\\pip-req-tracker-aim03qix'
  Removed better_exceptions from https://files.pythonhosted.org/packages/e8/cd/26f11b8e0c3d96cfe55452ac365d8aad369b341e42548378158221b44c29/better_exceptions-0.2.2-py3-none-any.whl#sha256=bf79c87659bc849989d726bf0e4a2100edefe7eded112d201f54fe08467fdf63 from build tracker 'C:\\Users\\juaquisp\\AppData\\Local\\Temp\\pip-req-tracker-aim03qix'
Requirement already satisfied: colorama; sys_platform == "win32" in c:\program files\python36\lib\site-packages (from better_exceptions) (0.3.9)
Installing collected packages: better-exceptions

Successfully installed better-exceptions-0.2.2
Cleaning up...
Removed build tracker 'C:\\Users\\juaquisp\\AppData\\Local\\Temp\\pip-req-tracker-aim03qix'
Qix- commented

Requirement already satisfied: colorama; sys_platform == "win32" in c:\program files\python36\lib\site-packages (from better_exceptions) (0.3.9)

This is suspicious.

mxrch commented

Up, I'm having the same issue on Windows 11 (on Powershell, and Python 3.8) after a fresh install of better_exceptions with pip, and colorama is already installed :

image