29.13. site - Site-specific configuration hook - Python 3.6.0 documentation - 0 views
-
-
Ken Wakita on 03 Mar 17Anacondaの仮想環境に非標準パスを追加するには、[sys.prefix]/pythonX.Y/site-packages/[仮想環境名].pth を用意し、そこに非標準パスのリストを列挙すればよいと思う。ここは仮想環境に特化した site-packages なので、ほかの仮想環境のパスを汚さないのでよい。 ここでの設定は(たぶん )IntelliJ にも伝わると思う。 PYTHONPATH環境変数は仮想環境に特化した設定にならないし、設定が IntelliJ に伝わらないのでよろしくない。
-
-
Support for the “site-python” directory has been removed.
-
For example, suppose sys.prefix and sys.exec_prefix are set to /usr/local. The Python X.Y library is then installed in /usr/local/lib/pythonX.Y. Suppose this has a subdirectory /usr/local/lib/pythonX.Y/site-packages with three subsubdirectories, foo, bar and spam, and two path configuration files, foo.pth and bar.pth. Assume foo.pth contains the following: