Pycharm error Django is not importable in this environment

前端 未结 17 1181
情话喂你
情话喂你 2021-02-01 13:00

I\'m getting the following errors in Pycharm.

Error: Django is not importable in this environment

It used to work well but I moved t

17条回答
  •  一个人的身影
    2021-02-01 13:24

    In my case, I was running the Cygwin version of Python when this error came up. Fixing it involved just adding some of cygwin's bin paths to Window's Path variable.

    Run "control sysdm.cpl" Go to the "Advanced" tab Click the "Environmental Variables" button at the bottom of this tab Find "Path" under "System Variables" Add to it ;c:/cygwin/bin;c:/cygwin/sbin;c:/cygwin/usr/local/bin

    I did not include /usr/bin, as for some reason, it is combined in to the /bin directory when viewing in windows.

提交回复
热议问题