163 | | If you're using python25, install py25-readline. |
164 | | |
165 | | === Why can't I `import foo` in Python 2.5? === |
166 | | |
167 | | A number of "standard python modules" are built separately from the python25 port: |
168 | | * zlib (py25-zlib) |
169 | | * _hashlib (py25-hashlib) |
170 | | * _ssl (py25-socket-ssl) |
171 | | * _bsddb (py25-bsddb) |
172 | | * _sqlite3 (py25-sqlite3) |
173 | | * _tkinter (py25-tkinter) |
174 | | * bz2 (py25-bz2) |
175 | | * gdbm (py25-gdbm) |
176 | | * readline (py25-readline) |
177 | | * _curses, _curses_panel (py25-curses) |
178 | | |
179 | | For further information about readline support in python25, see the above FAQ question. |
180 | | People with a FreeBSD background will find themselves familiar with this schema. |
| 163 | If you're using python25, make sure your python25 port is up to date, at least 2.5.4_4, when the standard modules were reintegrated back into the port itself (see ticket #12369). |
198 | | === Why does the python26/python30 port have so many dependencies? === #pydeps |
199 | | |
200 | | Earlier versions of the python ports either used variants (python23) or split some modules out from the base port (python24 and python25) in order to reduce the number of dependencies for the port. Using variants is bad as that requires a complete rebuild of the port in order to add a given module (like readline support); also, dependencies can't specify variants currently (see ticket #126). |
201 | | |
202 | | Using separate ports for these modules (like py25-readline) avoids the need to completely rebuild the base port, and can be used as a dependency, but ends up having other issues. One is that these modules are installed using the standard distutils method for python, which causes them to be installed in a different location than where they would be when installed normally (see ticket #12369). The other is that many python developers have expectations when they install python, and installing python24 or python25 simply does not match that. |
| 181 | === Why do the python ports have so many dependencies? === #pydeps |
| 182 | |
| 183 | Earlier versions of the python ports either used variants (python23) or split some modules out from the base port (python24) in order to reduce the number of dependencies for the port. Using variants is bad as that requires a complete rebuild of the port in order to add a given module (like readline support); also, dependencies can't specify variants currently (see ticket #126). |
| 184 | |
| 185 | Using separate ports for these modules (like py-readline) avoids the need to completely rebuild the base port, and can be used as a dependency, but ends up having other issues. One is that these modules are installed using the standard distutils method for python, which causes them to be installed in a different location than where they would be when installed normally (see ticket #12369). The other is that many python developers have expectations when they install python, and installing python24 simply does not match that. |