安装错误
fivesmallq opened this issue · comments
之前安装MySQL-python 1.2.4的时候distribute0.6.28安装有问题,就换成了1.2.3,之后可以了,到后面又出现问题了
输出
Downloading/unpacking misaka==1.0.3 (from mikoto==0.0.4->-r requirements.txt (line 10)) Could not find a version that satisfies the requirement misaka==1.0.3 (from mikoto==0.0.4->-r requirements.txt (line 10)) (from versions: 0.3.1, 0.3.2, 0.3.3, 0.4.0, 0.4.1, 0.4.2, 1.0.0, 1.0.1, 1.0.2) Cleaning up... No distributions matching the version for misaka==1.0.3 (from mikoto==0.0.4->-r requirements.txt (line 10)) Storing debug log for failure in /Users/fivesmallq/.pip/pip.log
No distributions matching the version for misaka==1.0.3 (from mikoto==0.0.4->-r requirements.txt (line 10)) Exception information: Traceback (most recent call last): File "/Users/fivesmallq/tool/code/code/venv/lib/python2.7/site-packages/pip/basecommand.py", line 122, in main status = self.run(options, args) File "/Users/fivesmallq/tool/code/code/venv/lib/python2.7/site-packages/pip/commands/install.py", line 278, in run requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) File "/Users/fivesmallq/tool/code/code/venv/lib/python2.7/site-packages/pip/req.py", line 1177, in prepare_files url = finder.find_requirement(req_to_install, upgrade=self.upgrade) File "/Users/fivesmallq/tool/code/code/venv/lib/python2.7/site-packages/pip/index.py", line 322, in find_requirement raise DistributionNotFound('No distributions matching the version for %s' % req) DistributionNotFound: No distributions matching the version for misaka==1.0.3 (from mikoto==0.0.4->-r requirements.txt (line 10))
试着先用 1.0.2 的版本?应该低版本也能用的吧?
或者尝试从源代码安装 misaka (see pengyuan/snowflake#2 https://github.com/FSX/misaka)。
@fivesmallq 给一下你的pip freeze
的结果?
@fivesmallq 你先手工执行一下
pip install -e "git+https://github.com/qingfeng/misaka.git@2fbe52692e8f304eea9d8925fd2a857916ff0ea5#egg=misaka-1.0.3"
新问题,启动的时候报错.
(venv)localhost:code fivesmallq$ gunicorn -w 2 -b 127.0.0.1:8000 app:app # web & git http daemon 2014-03-04 12:40:31 [50173] [INFO] Starting gunicorn 18.0 2014-03-04 12:40:31 [50173] [INFO] Listening at: http://127.0.0.1:8000 (50173) 2014-03-04 12:40:31 [50173] [INFO] Using worker: sync 2014-03-04 12:40:31 [50176] [INFO] Booting worker with pid: 50176 2014-03-04 12:40:31 [50177] [INFO] Booting worker with pid: 50177 2014-03-04 12:40:32 [50176] [ERROR] Exception in worker process: Traceback (most recent call last): File "/Library/Python/2.7/site-packages/gunicorn/arbiter.py", line 495, in spawn_worker worker.init_process() File "/Library/Python/2.7/site-packages/gunicorn/workers/base.py", line 106, in init_process self.wsgi = self.app.wsgi() File "/Library/Python/2.7/site-packages/gunicorn/app/base.py", line 114, in wsgi self.callable = self.load() File "/Library/Python/2.7/site-packages/gunicorn/app/wsgiapp.py", line 62, in load return self.load_wsgiapp() File "/Library/Python/2.7/site-packages/gunicorn/app/wsgiapp.py", line 49, in load_wsgiapp return util.import_app(self.app_uri) File "/Library/Python/2.7/site-packages/gunicorn/util.py", line 354, in import_app __import__(module) File "/Users/fivesmallq/tool/code/code/app.py", line 5, in <module> from web import app as web File "/Users/fivesmallq/tool/code/code/web.py", line 11, in <module> from vilya import views as controllers File "/Users/fivesmallq/tool/code/code/vilya/views/__init__.py", line 8, in <module> from vilya.views.organizations import OrganizationUI File "/Users/fivesmallq/tool/code/code/vilya/views/organizations/__init__.py", line 6, in <module> from vilya.models.organization import Organization File "/Users/fivesmallq/tool/code/code/vilya/models/organization.py", line 5, in <module> from vilya.libs.store import OrzField, store, IntegrityError, OrzBase File "/Users/fivesmallq/tool/code/code/vilya/libs/store.py", line 4, in <module> from MySQLdb import IntegrityError, connect File "/Library/Python/2.7/site-packages/MySQL_python-1.2.4-py2.7-macosx-10.9-intel.egg/MySQLdb/__init__.py", line 19, in <module> import _mysql ImportError: dlopen(/Library/Python/2.7/site-packages/MySQL_python-1.2.4-py2.7-macosx-10.9-intel.egg/_mysql.so, 2): Library not loaded: libmysqlclient.18.dylib Referenced from: /Library/Python/2.7/site-packages/MySQL_python-1.2.4-py2.7-macosx-10.9-intel.egg/_mysql.so Reason: image not found Traceback (most recent call last): File "/Library/Python/2.7/site-packages/gunicorn/arbiter.py", line 495, in spawn_worker worker.init_process() File "/Library/Python/2.7/site-packages/gunicorn/workers/base.py", line 106, in init_process self.wsgi = self.app.wsgi() File "/Library/Python/2.7/site-packages/gunicorn/app/base.py", line 114, in wsgi self.callable = self.load() File "/Library/Python/2.7/site-packages/gunicorn/app/wsgiapp.py", line 62, in load return self.load_wsgiapp() File "/Library/Python/2.7/site-packages/gunicorn/app/wsgiapp.py", line 49, in load_wsgiapp return util.import_app(self.app_uri) File "/Library/Python/2.7/site-packages/gunicorn/util.py", line 354, in import_app __import__(module) File "/Users/fivesmallq/tool/code/code/app.py", line 5, in <module> from web import app as web File "/Users/fivesmallq/tool/code/code/web.py", line 11, in <module> from vilya import views as controllers File "/Users/fivesmallq/tool/code/code/vilya/views/__init__.py", line 8, in <module> from vilya.views.organizations import OrganizationUI File "/Users/fivesmallq/tool/code/code/vilya/views/organizations/__init__.py", line 6, in <module> from vilya.models.organization import Organization File "/Users/fivesmallq/tool/code/code/vilya/models/organization.py", line 5, in <module> from vilya.libs.store import OrzField, store, IntegrityError, OrzBase File "/Users/fivesmallq/tool/code/code/vilya/libs/store.py", line 4, in <module> from MySQLdb import IntegrityError, connect File "/Library/Python/2.7/site-packages/MySQL_python-1.2.4-py2.7-macosx-10.9-intel.egg/MySQLdb/__init__.py", line 19, in <module> import _mysql ImportError: dlopen(/Library/Python/2.7/site-packages/MySQL_python-1.2.4-py2.7-macosx-10.9-intel.egg/_mysql.so, 2): Library not loaded: libmysqlclient.18.dylib Referenced from: /Library/Python/2.7/site-packages/MySQL_python-1.2.4-py2.7-macosx-10.9-intel.egg/_mysql.so Reason: image not found 2014-03-04 12:40:32 [50176] [INFO] Worker exiting (pid: 50176) 2014-03-04 12:40:32 [50177] [ERROR] Exception in worker process: Traceback (most recent call last): File "/Library/Python/2.7/site-packages/gunicorn/arbiter.py", line 495, in spawn_worker worker.init_process() File "/Library/Python/2.7/site-packages/gunicorn/workers/base.py", line 106, in init_process self.wsgi = self.app.wsgi() File "/Library/Python/2.7/site-packages/gunicorn/app/base.py", line 114, in wsgi self.callable = self.load() File "/Library/Python/2.7/site-packages/gunicorn/app/wsgiapp.py", line 62, in load return self.load_wsgiapp() File "/Library/Python/2.7/site-packages/gunicorn/app/wsgiapp.py", line 49, in load_wsgiapp return util.import_app(self.app_uri) File "/Library/Python/2.7/site-packages/gunicorn/util.py", line 354, in import_app __import__(module) File "/Users/fivesmallq/tool/code/code/app.py", line 5, in <module> from web import app as web File "/Users/fivesmallq/tool/code/code/web.py", line 11, in <module> from vilya import views as controllers File "/Users/fivesmallq/tool/code/code/vilya/views/__init__.py", line 8, in <module> from vilya.views.organizations import OrganizationUI File "/Users/fivesmallq/tool/code/code/vilya/views/organizations/__init__.py", line 6, in <module> from vilya.models.organization import Organization File "/Users/fivesmallq/tool/code/code/vilya/models/organization.py", line 5, in <module> from vilya.libs.store import OrzField, store, IntegrityError, OrzBase File "/Users/fivesmallq/tool/code/code/vilya/libs/store.py", line 4, in <module> from MySQLdb import IntegrityError, connect File "/Library/Python/2.7/site-packages/MySQL_python-1.2.4-py2.7-macosx-10.9-intel.egg/MySQLdb/__init__.py", line 19, in <module> import _mysql ImportError: dlopen(/Library/Python/2.7/site-packages/MySQL_python-1.2.4-py2.7-macosx-10.9-intel.egg/_mysql.so, 2): Library not loaded: libmysqlclient.18.dylib Referenced from: /Library/Python/2.7/site-packages/MySQL_python-1.2.4-py2.7-macosx-10.9-intel.egg/_mysql.so Reason: image not found Traceback (most recent call last): File "/Library/Python/2.7/site-packages/gunicorn/arbiter.py", line 495, in spawn_worker worker.init_process() File "/Library/Python/2.7/site-packages/gunicorn/workers/base.py", line 106, in init_process self.wsgi = self.app.wsgi() File "/Library/Python/2.7/site-packages/gunicorn/app/base.py", line 114, in wsgi self.callable = self.load() File "/Library/Python/2.7/site-packages/gunicorn/app/wsgiapp.py", line 62, in load return self.load_wsgiapp() File "/Library/Python/2.7/site-packages/gunicorn/app/wsgiapp.py", line 49, in load_wsgiapp return util.import_app(self.app_uri) File "/Library/Python/2.7/site-packages/gunicorn/util.py", line 354, in import_app __import__(module) File "/Users/fivesmallq/tool/code/code/app.py", line 5, in <module> from web import app as web File "/Users/fivesmallq/tool/code/code/web.py", line 11, in <module> from vilya import views as controllers File "/Users/fivesmallq/tool/code/code/vilya/views/__init__.py", line 8, in <module> from vilya.views.organizations import OrganizationUI File "/Users/fivesmallq/tool/code/code/vilya/views/organizations/__init__.py", line 6, in <module> from vilya.models.organization import Organization File "/Users/fivesmallq/tool/code/code/vilya/models/organization.py", line 5, in <module> from vilya.libs.store import OrzField, store, IntegrityError, OrzBase File "/Users/fivesmallq/tool/code/code/vilya/libs/store.py", line 4, in <module> from MySQLdb import IntegrityError, connect File "/Library/Python/2.7/site-packages/MySQL_python-1.2.4-py2.7-macosx-10.9-intel.egg/MySQLdb/__init__.py", line 19, in <module> import _mysql ImportError: dlopen(/Library/Python/2.7/site-packages/MySQL_python-1.2.4-py2.7-macosx-10.9-intel.egg/_mysql.so, 2): Library not loaded: libmysqlclient.18.dylib Referenced from: /Library/Python/2.7/site-packages/MySQL_python-1.2.4-py2.7-macosx-10.9-intel.egg/_mysql.so Reason: image not found 2014-03-04 12:40:32 [50177] [INFO] Worker exiting (pid: 50177) Traceback (most recent call last): File "/usr/local/bin/gunicorn", line 9, in <module> load_entry_point('gunicorn==18.0', 'console_scripts', 'gunicorn')() File "/Library/Python/2.7/site-packages/gunicorn/app/wsgiapp.py", line 71, in run WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run() File "/Library/Python/2.7/site-packages/gunicorn/app/base.py", line 143, in run Arbiter(self).run() File "/Library/Python/2.7/site-packages/gunicorn/arbiter.py", line 203, in run self.halt(reason=inst.reason, exit_status=inst.exit_status) File "/Library/Python/2.7/site-packages/gunicorn/arbiter.py", line 298, in halt self.stop() File "/Library/Python/2.7/site-packages/gunicorn/arbiter.py", line 341, in stop self.reap_workers() File "/Library/Python/2.7/site-packages/gunicorn/arbiter.py", line 452, in reap_workers raise HaltServer(reason, self.WORKER_BOOT_ERROR) gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
看起来是这个 MySQL_python-1.2.4
的问题,是通过pip安装的吗?
@qingfeng 实际我刚才又运行了一遍pip install -r requirements.txt
,没装好,后来用你说的打补丁的方式成功了.
@fivesmallq 你先手工执行一下 pip install -e "git+https://github.com/qingfeng/misaka.git@2fbe52692e8f304eea9d8925fd2a857916ff0ea5#egg=misaka-1.0.3"
终于成功了..
解决 Reason: image not found 错误
http://www.cnblogs.com/ifantastic/archive/2013/04/13/3017677.html
解决libmagic问题
http://www.brambraakman.com/blog/comments/installing_libmagic_in_mac_os_x_for_python-magic/
@fivesmallq 解决了就 close 掉吧……
这个patch后的版本其实已经写到了mikoto的安装依赖里了。