Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jan 27, 2023. It is now read-only.
/lsnm_in_pythonPublic archive

Installing Python modules

Antonio Ulloa edited this pageJun 11, 2015 ·6 revisions

The following was taken from the online tutorial:http://www.tutorialspoint.com/python/python_modules.htm

When you import a module, the Python interpreter searches for the module in the following sequences −

(a) The current directory.

If the module isn't found, Python then searches:

(b) each directory in the shell variable PYTHONPATH.

If all else fails, Python checks:

(c) the default path. On UNIX, this default path is normally /usr/local/lib/python/.

The module search path is stored in the system module sys as the sys.path variable. The sys.path variable contains the current directory, PYTHONPATH, and the installation-dependent default.

The PYTHONPATH is an environment variable, consisting of a list of directories. The syntax of PYTHONPATH is the same as that of the shell variable PATH:

set PYTHONPATH=/usr/local/lib/python

Clone this wiki locally

[8]ページ先頭

©2009-2025 Movatter.jp