简体   繁体   中英

pip installing dj_static, import error

Whenever I try to run this specific project I cloned via foreman start, I get

13:13:32 web.1  |   File "/Library/Python/2.7/site-packages/dj_static.py", line 7, in <module>
13:13:32 web.1  |     from django.core.handlers.base import get_path_info
13:13:32 web.1  | ImportError: cannot import name get_path_info

Mind you I am running this in a virtual env, and I used pip install -r requirements/dev.txt to install what I needed. Someone mentioned something about adding "it" to my PYTHONPATH, but I have no idea what "it" is and how to do that. Am I adding dj_static to my PYTHONPATH? Because I thought it would have been automatically added given I used pip install to get it. Is this true?

Any ideas would be much appreciated.

You either have installed two different versions or you have changed some file in the installation. Just reinstall django in your venv and it will work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM