Mailing List Archive

Fresh install of trac 1.4.3 can't find module _sqlite when running trac-admin initenv
I've been running Trac for 12 years, but stopped upgrading it at 1.0.3. It
recently stopped working. Attempts to upgrade it in place failed with the
same error as the installed instance (package 'six' not found). So I
backed it up, moved it out of the way, and started fresh installing v1.4.3.

I'm just about there, but after installing the prerequisites and Trac, now
trac-admin initenv fails. I'm stumped!

$ trac-admin $TRAC_ENV initenv
Traceback (most recent call last):
File "/home/user/opt/python-2.7.18/bin/trac-admin", line 5, in <module>
from trac.admin.console import run
File
"/home/user/opt/python-2.7.18/lib/python2.7/site-packages/trac/admin/console.py",
line 36, in <module>
from trac.env import Environment
File
"/home/user/opt/python-2.7.18/lib/python2.7/site-packages/trac/env.py",
line 42, in <module>
from trac.db.convert import copy_tables
File
"/home/user/opt/python-2.7.18/lib/python2.7/site-packages/trac/db/convert.py",
line 18, in <module>
from trac.db import sqlite_backend
File
"/home/user/opt/python-2.7.18/lib/python2.7/site-packages/trac/db/sqlite_backend.py",
line 39, in <module>
import sqlite3 as sqlite
File "/home/user/opt/python-2.7.18/lib/python2.7/sqlite3/__init__.py",
line 24, in <module>
from dbapi2 import *
File "/home/user/opt/python-2.7.18/lib/python2.7/sqlite3/dbapi2.py", line
28, in <module>
from _sqlite3 import *
ImportError: No module named _sqlite3

Rick

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/87146e1d-2963-44a2-8644-9d6fec0896b4n%40googlegroups.com.
Re: Fresh install of trac 1.4.3 can't find module _sqlite when running trac-admin initenv [ In reply to ]
Your python installation is broken. The sqlite3 module in python 2.7 is
typically available. You can verify with the following command:

/home/user/opt/python-2.7.18/bin/python -c "import sqlite3"

On Sun, Mar 19, 2023 at 14:31 Rick Macdonald <sailorickm@gmail.com> wrote:

> I've been running Trac for 12 years, but stopped upgrading it at 1.0.3. It
> recently stopped working. Attempts to upgrade it in place failed with the
> same error as the installed instance (package 'six' not found). So I
> backed it up, moved it out of the way, and started fresh installing v1.4.3.
>
> I'm just about there, but after installing the prerequisites and Trac,
> now trac-admin initenv fails. I'm stumped!
>
> $ trac-admin $TRAC_ENV initenv
> Traceback (most recent call last):
> File "/home/user/opt/python-2.7.18/bin/trac-admin", line 5, in <module>
> from trac.admin.console import run
> File
> "/home/user/opt/python-2.7.18/lib/python2.7/site-packages/trac/admin/console.py",
> line 36, in <module>
> from trac.env import Environment
> File
> "/home/user/opt/python-2.7.18/lib/python2.7/site-packages/trac/env.py",
> line 42, in <module>
> from trac.db.convert import copy_tables
> File
> "/home/user/opt/python-2.7.18/lib/python2.7/site-packages/trac/db/convert.py",
> line 18, in <module>
> from trac.db import sqlite_backend
> File
> "/home/user/opt/python-2.7.18/lib/python2.7/site-packages/trac/db/sqlite_backend.py",
> line 39, in <module>
> import sqlite3 as sqlite
> File "/home/user/opt/python-2.7.18/lib/python2.7/sqlite3/__init__.py",
> line 24, in <module>
> from dbapi2 import *
> File "/home/user/opt/python-2.7.18/lib/python2.7/sqlite3/dbapi2.py",
> line 28, in <module>
> from _sqlite3 import *
> ImportError: No module named _sqlite3
>
>
> Rick
>
--
Jun Omae <jun66j5@gmail.com> (?? ?)

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAEVLMaiOiDJX%3DtTkgeR7Nmf7UjHjv--KbEr50O%2Boti9oJ6vrrQ%40mail.gmail.com.
Re: Fresh install of trac 1.4.3 can't find module _sqlite when running trac-admin initenv [ In reply to ]
Same error. I just built this python today. Is there a configure option I
needed to turn on?

$ /home/user/opt/python-2.7.18/bin/python -c "import sqlite3"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/user/opt/python-2.7.18/lib/python2.7/sqlite3/__init__.py",
line 24, in <module>
from dbapi2 import *
File "/home/user/opt/python-2.7.18/lib/python2.7/sqlite3/dbapi2.py", line
28, in <module>
from _sqlite3 import *
ImportError: No module named _sqlite3

On Sunday, March 19, 2023 at 12:09:50?AM UTC-6 Jun Omae wrote:

> Your python installation is broken. The sqlite3 module in python 2.7 is
> typically available. You can verify with the following command:
>
> /home/user/opt/python-2.7.18/bin/python -c "import sqlite3"
>
> On Sun, Mar 19, 2023 at 14:31 Rick Macdonald <sailo...@gmail.com> wrote:
>
>> I've been running Trac for 12 years, but stopped upgrading it at 1.0.3.
>> It recently stopped working. Attempts to upgrade it in place failed with
>> the same error as the installed instance (package 'six' not found). So I
>> backed it up, moved it out of the way, and started fresh installing v1.4.3.
>>
>> I'm just about there, but after installing the prerequisites and Trac,
>> now trac-admin initenv fails. I'm stumped!
>>
>> $ trac-admin $TRAC_ENV initenv
>> Traceback (most recent call last):
>> File "/home/user/opt/python-2.7.18/bin/trac-admin", line 5, in <module>
>> from trac.admin.console import run
>> File
>> "/home/user/opt/python-2.7.18/lib/python2.7/site-packages/trac/admin/console.py",
>> line 36, in <module>
>> from trac.env import Environment
>> File
>> "/home/user/opt/python-2.7.18/lib/python2.7/site-packages/trac/env.py",
>> line 42, in <module>
>> from trac.db.convert import copy_tables
>> File
>> "/home/user/opt/python-2.7.18/lib/python2.7/site-packages/trac/db/convert.py",
>> line 18, in <module>
>> from trac.db import sqlite_backend
>> File
>> "/home/user/opt/python-2.7.18/lib/python2.7/site-packages/trac/db/sqlite_backend.py",
>> line 39, in <module>
>> import sqlite3 as sqlite
>> File "/home/user/opt/python-2.7.18/lib/python2.7/sqlite3/__init__.py",
>> line 24, in <module>
>> from dbapi2 import *
>> File "/home/user/opt/python-2.7.18/lib/python2.7/sqlite3/dbapi2.py",
>> line 28, in <module>
>> from _sqlite3 import *
>> ImportError: No module named _sqlite3
>>
>>
>> Rick
>>
> --
> Jun Omae <jun...@gmail.com> (?? ?)
>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/4d072a29-6997-4725-b1f1-f302cfdc99aen%40googlegroups.com.
Re: Fresh install of trac 1.4.3 can't find module _sqlite when running trac-admin initenv [ In reply to ]
What kind of distribution are you using? How did you build the installed
python? Unable to help due to less information.

On Sun, Mar 19, 2023 at 15:50 Rick Macdonald <sailorickm@gmail.com> wrote:

> Same error. I just built this python today. Is there a configure option I
> needed to turn on?
>
> $ /home/user/opt/python-2.7.18/bin/python -c "import sqlite3"
> Traceback (most recent call last):
> File "<string>", line 1, in <module>
> File "/home/user/opt/python-2.7.18/lib/python2.7/sqlite3/__init__.py",
> line 24, in <module>
> from dbapi2 import *
> File "/home/user/opt/python-2.7.18/lib/python2.7/sqlite3/dbapi2.py",
> line 28, in <module>
> from _sqlite3 import *
> ImportError: No module named _sqlite3
>
--
Jun Omae <jun66j5@gmail.com> (?? ?)

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAEVLMaiFpcVJRn5fy-%2BkGzHB7bUgsS__1mT8RKAdsZ90GDkjUw%40mail.gmail.com.
Re: Fresh install of trac 1.4.3 can't find module _sqlite when running trac-admin initenv [ In reply to ]
I think configure would have included it if it found it. I don't have root or sudo access on this host so maybe the only option is to build a local copy for configure to find?

On March 19, 2023 12:50:06 a.m. MDT, Rick Macdonald <sailorickm@gmail.com> wrote:
>Same error. I just built this python today. Is there a configure option I
>needed to turn on?
>
>$ /home/user/opt/python-2.7.18/bin/python -c "import sqlite3"
>Traceback (most recent call last):
> File "<string>", line 1, in <module>
> File "/home/user/opt/python-2.7.18/lib/python2.7/sqlite3/__init__.py",
>line 24, in <module>
> from dbapi2 import *
> File "/home/user/opt/python-2.7.18/lib/python2.7/sqlite3/dbapi2.py", line
>28, in <module>
> from _sqlite3 import *
>ImportError: No module named _sqlite3
>
>On Sunday, March 19, 2023 at 12:09:50?AM UTC-6 Jun Omae wrote:
>
>> Your python installation is broken. The sqlite3 module in python 2.7 is
>> typically available. You can verify with the following command:
>>
>> /home/user/opt/python-2.7.18/bin/python -c "import sqlite3"
>>
>> On Sun, Mar 19, 2023 at 14:31 Rick Macdonald <sailo...@gmail.com> wrote:
>>
>>> I've been running Trac for 12 years, but stopped upgrading it at 1.0.3.
>>> It recently stopped working. Attempts to upgrade it in place failed with
>>> the same error as the installed instance (package 'six' not found). So I
>>> backed it up, moved it out of the way, and started fresh installing v1.4.3.
>>>
>>> I'm just about there, but after installing the prerequisites and Trac,
>>> now trac-admin initenv fails. I'm stumped!
>>>
>>> $ trac-admin $TRAC_ENV initenv
>>> Traceback (most recent call last):
>>> File "/home/user/opt/python-2.7.18/bin/trac-admin", line 5, in <module>
>>> from trac.admin.console import run
>>> File
>>> "/home/user/opt/python-2.7.18/lib/python2.7/site-packages/trac/admin/console.py",
>>> line 36, in <module>
>>> from trac.env import Environment
>>> File
>>> "/home/user/opt/python-2.7.18/lib/python2.7/site-packages/trac/env.py",
>>> line 42, in <module>
>>> from trac.db.convert import copy_tables
>>> File
>>> "/home/user/opt/python-2.7.18/lib/python2.7/site-packages/trac/db/convert.py",
>>> line 18, in <module>
>>> from trac.db import sqlite_backend
>>> File
>>> "/home/user/opt/python-2.7.18/lib/python2.7/site-packages/trac/db/sqlite_backend.py",
>>> line 39, in <module>
>>> import sqlite3 as sqlite
>>> File "/home/user/opt/python-2.7.18/lib/python2.7/sqlite3/__init__.py",
>>> line 24, in <module>
>>> from dbapi2 import *
>>> File "/home/user/opt/python-2.7.18/lib/python2.7/sqlite3/dbapi2.py",
>>> line 28, in <module>
>>> from _sqlite3 import *
>>> ImportError: No module named _sqlite3
>>>
>>>
>>> Rick
>>>
>> --
>> Jun Omae <jun...@gmail.com> (?? ?)
>>
>
>--
>You received this message because you are subscribed to the Google Groups "Trac Users" group.
>To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
>To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/4d072a29-6997-4725-b1f1-f302cfdc99aen%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/AF15A544-2582-43E7-9DE9-DBCEE753626F%40gmail.com.
Re: Fresh install of trac 1.4.3 can't find module _sqlite when running trac-admin initenv [ In reply to ]
Yes. Required libraries should be built in local (e.g. $HOME/lib) and be
passed to configure options. I suggest to check warnings in build log of
the python.

On Sun, Mar 19, 2023 at 16:20 sailorickm <sailorickm@gmail.com> wrote:

> I think configure would have included it if it found it. I don't have
> root or sudo access on this host so maybe the only option is to build a
> local copy for configure to find?
>
--
Jun Omae <jun66j5@gmail.com> (?? ?)

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAEVLMahW-RC0mOma8yG5c06hdrLB7uBnNvE0Rg6Fm%2BoYK%3Dicug%40mail.gmail.com.
Re: Fresh install of trac 1.4.3 can't find module _sqlite when running trac-admin initenv [ In reply to ]
Thanks! This finally got the build to include sqlite3:

CPPFLAGS=-I/home/wsiuser/.local/include ./configure
--prefix=$HOME/opt/python-2.7.18 --with-ensurepip=install


On Sun, Mar 19, 2023 at 5:17?AM Jun Omae <jun66j5@gmail.com> wrote:

> Yes. Required libraries should be built in local (e.g. $HOME/lib) and be
> passed to configure options. I suggest to check warnings in build log of
> the python.
>
> On Sun, Mar 19, 2023 at 16:20 sailorickm <sailorickm@gmail.com> wrote:
>
>> I think configure would have included it if it found it. I don't have
>> root or sudo access on this host so maybe the only option is to build a
>> local copy for configure to find?
>>
> --
> Jun Omae <jun66j5@gmail.com> (?? ?)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Trac Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to trac-users+unsubscribe@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/trac-users/CAEVLMahW-RC0mOma8yG5c06hdrLB7uBnNvE0Rg6Fm%2BoYK%3Dicug%40mail.gmail.com
> <https://groups.google.com/d/msgid/trac-users/CAEVLMahW-RC0mOma8yG5c06hdrLB7uBnNvE0Rg6Fm%2BoYK%3Dicug%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CALCSVubpvR-DB1V4m0qP%2BGiBN_UFD-hPSAK1VwdoSaSut2eL9Q%40mail.gmail.com.