I have a Python app that works fine. Now I use py2exe to create a windows executable of this app, however the resulting exe fails with complain that it lacks the configobj module
Traceback (most recent call last):
File "file1.py", line 1, in <module>
File "file2.pyc", line 10, in <module>
ImportError: No module named configobj
Line 10 in file2.py is merely from configobj import ConfigObj
I tried to explicitly add configobj to the list of packed modules by specifying -i configobj argument, but then the py2exe run fails with the similar error:
running py2exe
creating C:\path\to\proj\dist
*** generate typelib stubs ***
collected 0 stubs from 1 type libraries
*** searching for required modules ***
Traceback (most recent call last):
File " C:\path\to\proj\py2exe_setup.py", line 18, in <module>
options = {"py2exe": {"typelibs": [('{00020813-0000-0000-C000-000000000046}', 0, 1, 5)]}},
File "C:\Python26\lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "C:\Python26\lib\distutils\dist.py", line 975, in run_commands
self.run_command(cmd)
File "C:\Python26\lib\distutils\dist.py", line 995, in run_command
cmd_obj.run()
File "C:\Python26\lib\site-packages\py2exe\build_exe.py", line 243, in run
self._run()
File "C:\Python26\lib\site-packages\py2exe\build_exe.py", line 296, in _run
self.find_needed_modules(mf, required_files, required_modules)
File "C:\Python26\lib\site-packages\py2exe\build_exe.py", line 1297, in find_needed_modules
mf.import_hook(mod)
File "C:\Python26\lib\site-packages\py2exe\mf.py", line 719, in import_hook
return Base.import_hook(self,name,caller,fromlist,level)
File "C:\Python26\lib\site-packages\py2exe\mf.py", line 136, in import_hook
q, tail = self.find_head_package(parent, name)
File "C:\Python26\lib\site-packages\py2exe\mf.py", line 204, in find_head_package
raise ImportError, "No module named " + qname
ImportError: No module named configobj
The configobj module is installed on my computer in its default location
Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import configobj
>>> print configobj.__version__
4.7.2
>>> import py2exe
C:\Python26\lib\site-packages\py2exe\build_exe.py:16: DeprecationWarning: the sets module is deprecated
import sets
>>> print py2exe.__version__
0.6.9
What am I doing wrong ?
Reinstalling configobj from source fixed the problem. Damn me if I know why
Related
Im unable to renew my ssl-certificate via certbot,When i run certbot command it says :
AttributeError: cffi library '_openssl' has no function, constant or global variable named 'Cryptography_HAS_MEM_FUNCTIONS'
Below my setup described :
Ubuntu version :
DISTRIB_RELEASE=16.04
Openssl Version :
OpenSSL 1.1.1g 21 Apr 2020
python and cryptography version :
root#testingvm:~# python
Python 2.7.12 (default, Mar 1 2021, 11:38:31)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cryptography
>>> cryptography.__version__
'1.9'
When i try to dry-run the certbot cert renewal command :
root#testingvm:# certbot renew --dry-run
root#testingvm:# certbot renew --dry-run
Traceback (most recent call last):
File "/usr/bin/certbot", line 11, in <module>
load_entry_point('certbot==0.31.0', 'console_scripts', 'certbot')()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 561, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2631, in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2291, in load
return self.resolve()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2297, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python3/dist-packages/certbot/main.py", line 10, in <module>
import josepy as jose
File "/usr/lib/python3/dist-packages/josepy/__init__.py", line 44, in <module>
from josepy.interfaces import JSONDeSerializable
File "/usr/lib/python3/dist-packages/josepy/interfaces.py", line 8, in <module>
from josepy import errors, util
File "/usr/lib/python3/dist-packages/josepy/util.py", line 4, in <module>
import OpenSSL
File "/usr/lib/python3/dist-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import crypto, SSL
File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 16, in <module>
from OpenSSL._util import (
File "/usr/lib/python3/dist-packages/OpenSSL/_util.py", line 6, in <module>
from cryptography.hazmat.bindings.openssl.binding import Binding
File "/usr/lib/python3/dist-packages/cryptography/hazmat/bindings/openssl/binding.py", line 156, in <module>
Binding.init_static_locks()
File "/usr/lib/python3/dist-packages/cryptography/hazmat/bindings/openssl/binding.py", line 137, in init_static_locks
cls._ensure_ffi_initialized()
File "/usr/lib/python3/dist-packages/cryptography/hazmat/bindings/openssl/binding.py", line 124, in _ensure_ffi_initialized
cls.lib = build_conditional_library(lib, CONDITIONAL_NAMES)
File "/usr/lib/python3/dist-packages/cryptography/hazmat/bindings/openssl/binding.py", line 84, in build_conditional_library
if not getattr(lib, condition):
AttributeError: cffi library '_openssl' has no function, constant or global variable named 'Cryptography_HAS_MEM_FUNCTIONS'
Here is my error trace of python manage.py runserver I am using django 1.10.7 with python 2.7
(faavenv) user#ubutnu:~/Documents/faa-backend$ python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 14, in <module>
execute_from_command_line(sys.argv)
File "/home/user/Documents/faa-backend/faavenv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
utility.execute()
File "/home/user/Documents/faa-backend/faavenv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 316, in execute
settings.INSTALLED_APPS
File "/home/user/Documents/faa-backend/faavenv/local/lib/python2.7/site-packages/django/conf/__init__.py", line 53, in __getattr__
self._setup(name)
File "/home/user/Documents/faa-backend/faavenv/local/lib/python2.7/site-packages/django/conf/__init__.py", line 41, in _setup
self._wrapped = Settings(settings_module)
File "/home/user/Documents/faa-backend/faavenv/local/lib/python2.7/site-packages/django/conf/__init__.py", line 97, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named djangochat.settings
Here is my requirements.txt
amqp==2.2.1
anyjson==0.3.3
asn1crypto==0.22.0
Babel==2.4.0
backports-abc==0.5
bcrypt==3.1.3
BeautifulSoup==3.2.1
beautifulsoup4==4.6.0
billiard==3.5.0.3
bleach==2.0.0
boto==2.48.0
boto3==1.4.4
botocore==1.5.80
celery==4.1.0
certifi==2017.4.17
cffi==1.10.0
chardet==3.0.4
cryptography==1.9
Django==1.10.7
django-celery-beat==1.0.1
django-contrib-comments==1.8.0
django-debug-toolbar==1.8
django-environ==0.4.3
django-nocaptcha-recaptcha==0.0.19
django-storages-redux==1.3.3
docutils==0.13.1
enum34==1.1.6
Fabric==1.13.2
feedparser==5.2.1
filebrowser-safe==0.4.7
flower==0.9.2
future==0.16.0
futures==3.1.1
grappelli-safe==0.4.6
html5lib==0.999999999
idna==2.5
ipaddress==1.0.18
jmespath==0.9.3
kombu==4.1.0
Mezzanine==4.2.3
nltk==3.2.4
numpy==1.13.0
oauthlib==2.0.2
olefile==0.44
pandas==0.20.2
paramiko==2.2.1
Pillow==4.1.1
psycopg2==2.7.1
pyasn1==0.2.3
pycparser==2.17
pycryptodomex==3.4.6
pyjwkest==1.3.6
PyJWT==1.5.2
PyNaCl==1.1.2
python-dateutil==2.6.0
python-openid==2.2.5
pytz==2017.2
requests==2.18.1
requests-oauthlib==0.8.0
s3transfer==0.1.10
scikit-learn==0.18.2
scipy==0.19.1
singledispatch==3.4.0.3
six==1.10.0
sklearn==0.0
social-auth-app-django==1.2.0
social-auth-core==1.4.0
sqlparse==0.2.3
tornado==4.5.1
tzlocal==1.4
urllib3==1.21.1
vine==1.1.4
webencodings==0.5.1
Problem is that I haven't install Django chat in my environment. Still, it is showing above error. Not only this project but in all project, I am receiving this error.
I tried to reinstall all library again but doesn't help.
Any suggestion would be appreciated.
(faavenv) user#ubuntu:~/Documents/faa-backend$ python manage.py shell
Traceback (most recent call last):
File "manage.py", line 14, in <module>
execute_from_command_line(sys.argv)
File "/home/user/Documents/faa-backend/faavenv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
utility.execute()
File "/home/user/Documents/faa-backend/faavenv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 316, in execute
settings.INSTALLED_APPS
File "/home/user/Documents/faa-backend/faavenv/local/lib/python2.7/site-packages/django/conf/__init__.py", line 53, in __getattr__
self._setup(name)
File "/home/user/Documents/faa-backend/faavenv/local/lib/python2.7/site-packages/django/conf/__init__.py", line 41, in _setup
self._wrapped = Settings(settings_module)
File "/home/soham/Documents/faa-backend/faavenv/local/lib/python2.7/site-packages/django/conf/__init__.py", line 97, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named djangochat.settings
(faavenv) user#ubuntu:~/Documents/faa-backend$ python
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import djangoChat
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named djangoChat
>>>
This error usually happens because you have a file that uses django and django is not imported.
You probably have a script somewhere in your project that is imported and has a executable function without the if __name__ == "__main__": part. So runserver imports this script, try to execute and fail, because django is not imported. So, if you have something like this, be sure that the running function is inside the above if statement, so runserver does not try to run the script when it is imported.
So, if you want to run a script that uses django (and it is not inside the models, views, forms usual stuff), you need to setup django first. You need to find the problematic file and add the following at the top:
import django
sys.path.append("path/to/django/settingsapp")
os.environ["DJANGO_SETTINGS_MODULE"] = "djangochat.settings"
django.setup()
If you find the problematic file and add the above, it will probably fix it.
Hope this helps.
Thank you for all answers, I just moved my project location and set it up again and It works. still, I don't know what was the issue but after moving project directory and environment It is working.
I'm having problems using NanoMsg. I was using default sockets before but then someone pointed out that this was a bad idea. So I searched to get a better package and found NanoMsg. When I tried importing I got this error:
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:01:18) [MSC v.1900 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>>
================= RESTART: C:\Users\user\Desktop\Website.py =================
=============================== RESTART: Shell ===============================
>>> import nanomsg
Warning (from warnings module):
File "C:\Users\user\lib\site-packages\nanomsg_wrappers\__init__.py", line 22
"%s, performance may be affected!") % (default,))
UserWarning: Could not load the default wrapper for your platform: cpy, performance may be affected!
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import nanomsg
File "C:\Users\user\lib\site-packages\nanomsg\__init__.py", line 7, in <module>
from . import wrapper
File "C:\Users\user\lib\site-packages\nanomsg\wrapper.py", line 4, in <module>
_wrapper = _load_wrapper()
File "C:\Users\user\lib\site-packages\nanomsg_wrappers\__init__.py", line 23, in load_wrapper
return importlib.import_module('_nanomsg_ctypes')
File "C:\Users\user\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\user\lib\site-packages\_nanomsg_ctypes\__init__.py", line 10, in <module>
_lib = ctypes.windll.nanomsg
File "C:\Users\user\lib\ctypes\__init__.py", line 417, in __getattr__
dll = self._dlltype(name)
File "C:\Users\user\lib\ctypes\__init__.py", line 347, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
>>>
Any solutions?
I'm trying to install twisted
pip install https://pypi.python.org/packages/18/85/eb7af503356e933061bf1220033c3a85bad0dbc5035dfd9a97f1e900dfcb/Twisted-16.2.0.tar.bz2#md5=8b35a88d5f1a4bfd762a008968fddabf
This is for a django-channels project and I'm having the following error problem
Exception:
Traceback (most recent call last):
File "/home/petarp/.virtualenvs/ErasmusCloneFromGitHub/lib/python3.5/tarfile.py", line 1655, in bz2open
import bz2
File "/usr/local/lib/python3.5/bz2.py", line 22, in <module>
from _bz2 import BZ2Compressor, BZ2Decompressor
ImportError: No module named '_bz2'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/petarp/.virtualenvs/CloneFromGitHub/lib/python3.5/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/home/petarp/.virtualenvs/ErasmusCloneFromGitHub/lib/python3.5/site-packages/pip/commands/install.py", line 310, in run
wb.build(autobuilding=True)
File "/home/petarp/.virtualenvs/ErasmusCloneFromGitHub/lib/python3.5/site-packages/pip/wheel.py", line 750, in build
self.requirement_set.prepare_files(self.finder)
File "/home/petarp/.virtualenvs/ErasmusCloneFromGitHub/lib/python3.5/site-packages/pip/req/req_set.py", line 370, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/home/petarp/.virtualenvs/ErasmusCloneFromGitHub/lib/python3.5/site-packages/pip/req/req_set.py", line 587, in _prepare_file
session=self.session, hashes=hashes)
File "/home/petarp/.virtualenvs/ErasmusCloneFromGitHub/lib/python3.5/site-packages/pip/download.py", line 810, in unpack_url
hashes=hashes
File "/home/petarp/.virtualenvs/ErasmusCloneFromGitHub/lib/python3.5/site-packages/pip/download.py", line 653, in unpack_http_url
unpack_file(from_path, location, content_type, link)
File "/home/petarp/.virtualenvs/ErasmusCloneFromGitHub/lib/python3.5/site-packages/pip/utils/__init__.py", line 605, in unpack_file
untar_file(filename, location)
File "/home/petarp/.virtualenvs/ErasmusCloneFromGitHub/lib/python3.5/site-packages/pip/utils/__init__.py", line 538, in untar_file
tar = tarfile.open(filename, mode)
File "/home/petarp/.virtualenvs/ErasmusCloneFromGitHub/lib/python3.5/tarfile.py", line 1580, in open
return func(name, filemode, fileobj, **kwargs)
File "/home/petarp/.virtualenvs/ErasmusCloneFromGitHub/lib/python3.5/tarfile.py", line 1657, in bz2open
raise CompressionError("bz2 module is not available")
tarfile.CompressionError: bz2 module is not available
Clearly I'm missing bz2 module, so I've tried to installed it manually, but that didn't worked out for python 3.5, so how can I solved this?
I've did what #e4c5 suggested but I did it for python3.5.1, the output is
➜ ~ python3.5
Python 3.5.1 (default, Apr 19 2016, 22:45:11)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import bz2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.5/bz2.py", line 22, in <module>
from _bz2 import BZ2Compressor, BZ2Decompressor
ImportError: No module named '_bz2'
>>>
[3] + 18945 suspended python3.5
➜ ~ dpkg -S /usr/local/lib/python3.5/bz2.py
dpkg-query: no path found matching pattern /usr/local/lib/python3.5/bz2.py
I am on Ubuntu 14.04 LTS and I have installed python 3.5 from source.
I don't seem to have any problem with import bz2 on my python 3.4 installation. So I did
import bz2
print (bz2.__file__)
And found that it's located at /usr/lib/python3.4/bz2.py then I did
dpkg -S /usr/lib/python3.4/bz2.py
This reveals:
libpython3.4-stdlib:amd64: /usr/lib/python3.4/bz2.py
Thus the following command should hopefully fix this:
apt-get install libpython3.4-stdlib
Update:
If you have compiled python 3.5 from sources, it's very likely the bz2 hasn't been compiled in. Please reinstall by first doing
./configure --with-libs='bzip'
The same applies for python 3.6 as well. Note that this will probably complain about other missing dependencies. You will have to install the missing dependencies one by one until everything is covered.
I was able to solve it by removing the _ and changing the import to
from bz2 import BZ2Compressor, BZ2Decompressor
On ubuntu, apt-get install libbz2-dev then compile python again.
After installing OS X Mavericks, I have been having issues running django's server:
(rango_tutorial)christohersmbp2:tango_with_django_project christopherspears$ python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/Users/christopherspears/.virtualenvs/rango_tutorial/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
utility.execute()
File "/Users/christopherspears/.virtualenvs/rango_tutorial/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/christopherspears/.virtualenvs/rango_tutorial/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
self.execute(*args, **options.__dict__)
File "/Users/christopherspears/.virtualenvs/rango_tutorial/lib/python2.7/site-packages/django/core/management/base.py", line 280, in execute
translation.activate('en-us')
File "/Users/christopherspears/.virtualenvs/rango_tutorial/lib/python2.7/site-packages/django/utils/translation/__init__.py", line 130, in activate
return _trans.activate(language)
File "/Users/christopherspears/.virtualenvs/rango_tutorial/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 188, in activate
_active.value = translation(language)
File "/Users/christopherspears/.virtualenvs/rango_tutorial/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 177, in translation
default_translation = _fetch(settings.LANGUAGE_CODE)
File "/Users/christopherspears/.virtualenvs/rango_tutorial/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 159, in _fetch
app = import_module(appname)
File "/Users/christopherspears/.virtualenvs/rango_tutorial/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
__import__(name)
File "/Users/christopherspears/.virtualenvs/rango_tutorial/lib/python2.7/site-packages/django/contrib/admin/__init__.py", line 6, in <module>
from django.contrib.admin.sites import AdminSite, site
File "/Users/christopherspears/.virtualenvs/rango_tutorial/lib/python2.7/site-packages/django/contrib/admin/sites.py", line 4, in <module>
from django.contrib.admin.forms import AdminAuthenticationForm
File "/Users/christopherspears/.virtualenvs/rango_tutorial/lib/python2.7/site-packages/django/contrib/admin/forms.py", line 6, in <module>
from django.contrib.auth.forms import AuthenticationForm
File "/Users/christopherspears/.virtualenvs/rango_tutorial/lib/python2.7/site-packages/django/contrib/auth/forms.py", line 17, in <module>
from django.contrib.auth.models import User
File "/Users/christopherspears/.virtualenvs/rango_tutorial/lib/python2.7/site-packages/django/contrib/auth/models.py", line 48, in <module>
class Permission(models.Model):
File "/Users/christopherspears/.virtualenvs/rango_tutorial/lib/python2.7/site-packages/django/db/models/base.py", line 96, in __new__
new_class.add_to_class('_meta', Options(meta, **kwargs))
File "/Users/christopherspears/.virtualenvs/rango_tutorial/lib/python2.7/site-packages/django/db/models/base.py", line 264, in add_to_class
value.contribute_to_class(cls, name)
File "/Users/christopherspears/.virtualenvs/rango_tutorial/lib/python2.7/site-packages/django/db/models/options.py", line 124, in contribute_to_class
self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
File "/Users/christopherspears/.virtualenvs/rango_tutorial/lib/python2.7/site-packages/django/db/__init__.py", line 34, in __getattr__
return getattr(connections[DEFAULT_DB_ALIAS], item)
File "/Users/christopherspears/.virtualenvs/rango_tutorial/lib/python2.7/site-packages/django/db/utils.py", line 198, in __getitem__
backend = load_backend(db['ENGINE'])
File "/Users/christopherspears/.virtualenvs/rango_tutorial/lib/python2.7/site-packages/django/db/utils.py", line 113, in load_backend
return import_module('%s.base' % backend_name)
File "/Users/christopherspears/.virtualenvs/rango_tutorial/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
__import__(name)
File "/Users/christopherspears/.virtualenvs/rango_tutorial/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py", line 35, in <module>
raise ImproperlyConfigured("Error loading either pysqlite2 or sqlite3 modules (tried in that order): %s" % exc)
django.core.exceptions.ImproperlyConfigured: Error loading either pysqlite2 or sqlite3 modules (tried in that order): dlopen(/Users/christopherspears/.virtualenvs/rango_tutorial/lib/python2.7/lib-dynload/_sqlite3.so, 2): Symbol not found: _sqlite3_enable_load_extension
Referenced from: /Users/christopherspears/.virtualenvs/rango_tutorial/lib/python2.7/lib-dynload/_sqlite3.so
Expected in: /usr/lib/libsqlite3.dylib
in /Users/christopherspears/.virtualenvs/rango_tutorial/lib/python2.7/lib-dynload/_sqlite3.so
I think the issue is that the sqlite3 module has gone missing for some reason:
(rango_tutorial)christohersmbp2:tango_with_django_project christopherspears$ python
Python 2.7.5 (default, Dec 31 2013, 11:46:08)
[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sqlite3/__init__.py", line 24, in <module>
from dbapi2 import *
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sqlite3/dbapi2.py", line 27, in <module>
from _sqlite3 import *
ImportError: dlopen(/Users/christopherspears/.virtualenvs/rango_tutorial/lib/python2.7/lib-dynload/_sqlite3.so, 2): Symbol not found: _sqlite3_enable_load_extension
Referenced from: /Users/christopherspears/.virtualenvs/rango_tutorial/lib/python2.7/lib-dynload/_sqlite3.so
Expected in: /usr/lib/libsqlite3.dylib
in /Users/christopherspears/.virtualenvs/rango_tutorial/lib/python2.7/lib-dynload/_sqlite3.so
I'm not sure what is causing this. Isn't the sqlite3 module normally just part of Python?
Updating OS X is notorious for messing up all sorts of Developer Tools.
What is your output when you type which sqlite3? How about other developer tools like which gcc? If they are missing you may need to reinstall Xcode. I know many users had to reinstall XCode after updating to Mavericks.
Here's the link for more information: https://developer.apple.com/xcode/
Uninstalling and reinstalling python with brew seemed to help with the earlier problem. Of course now, python is broken in that virtual environment:
(rango_tutorial)christohersmbp2:tango_with_django_project christopherspears$ python manage.py runserver
dyld: Library not loaded: #executable_path/../.Python
Referenced from: /Users/christopherspears/.virtualenvs/rango_tutorial/bin/python
Reason: image not found
Trace/BPT trap: 5
(rango_tutorial)christohersmbp2:tango_with_django_project christopherspears$ python
dyld: Library not loaded: #executable_path/../.Python
Referenced from: /Users/christopherspears/.virtualenvs/rango_tutorial/bin/python
Reason: image not found
Trace/BPT trap: 5