8

I am trying to install django-adim-tools using pip, but this is what happens:

C:\Users\hugo.villalobos>pip install django-admin-tools
Could not import runpy module
Traceback (most recent call last):
  File "C:\Python34\Lib\runpy.py", line 14, in <module>
    import importlib.machinery # importlib first so we can test #15386 via -m
  File "C:\Python34\Lib\importlib\__init__.py", line 34, in <module>
    _w_long = _bootstrap._w_long
AttributeError: module 'importlib._bootstrap' has no attribute '_w_long'

I have no idea how to proceed to solve it.

bad_coder
  • 11,289
  • 20
  • 44
  • 72
HuLu ViCa
  • 5,077
  • 10
  • 43
  • 93

2 Answers2

13

In my case, I have multiple Python (3.7, 3.6, 3.4) installed in my PC. The environment var $PATH and $PYTHONPATH is pointing to different version's. After resetting these 2 environment vars correctly everything runs correctly then.

JackieLam
  • 668
  • 1
  • 7
  • 20
0

had similar issue running the command:

pipenv install --python 3.8

solved by removing python3.8 from environment variable $PATH, and keeping only 3.7 as default python:

C:\Users\MB\AppData\Local\Programs\Python\Python37\Scripts\
C:\Users\MB\AppData\Local\Programs\Python\Python37\
Badjio
  • 610
  • 1
  • 8
  • 12