how to manage sys.path globally in pycharm

后端 未结 3 1543
抹茶落季
抹茶落季 2021-02-14 03:54

I have a bunch of unittests that import stuff not from /python2.7/site-packages/ but from a completely different directory. So what I do is do some monkey-patching

3条回答
  •  星月不相逢
    2021-02-14 04:13

    This is one fairly easy, follow this path:

    1. settings
    2. project:
    3. project interpreter
    4. select the interpreter you want to update sys.path for
    5. find the bottom right icon, 'show paths for the selected interpreter'
    6. add the folder to the list of paths.

提交回复
热议问题