How do you correct Module already loaded UserWarnings in Python?

后端 未结 5 608
星月不相逢
星月不相逢 2021-01-01 16:48

Getting the following kinds of warnings when running most python scripts in the command line:

/Library/Python/2.6/site-packages/virtualenvwrapper/hook_loader         


        
5条回答
  •  死守一世寂寞
    2021-01-01 17:06

    Perhaps use the virtualenv option --no-site-packages so you won't see any system site-packages within your virtual environment. Having items installed both in your virtualenv and on the system root may be the cause of this issue.

    Using --no-site-packages when creating your virtualenv prevents any conflict between system packages. I almost always use that option when creating a new virtualenv to prevent any conflicts. Though I may have several copies of libraries, at least they don't mess with each other.

提交回复
热议问题