我正在寫在Django的web應用程序,使用下面的第三方庫上:的IOError生產服務器
Django==1.6.1
argparse==1.2.1
cffi==0.8.1
pycparser==2.10
pylast==0.5.11
pyspotify==2.0.0a1
wsgiref==0.1.2
我一直在sudo pip install git+git://github.com/mopidy/pyspotify.git
安裝pyspotify因爲我想dev的版本。
當我在本地運行Django應用程序時,一切正常。當我拉的變化到我的Apache服務器,pip install -r requirements.txt
,重新啓動服務器,訪問IP,我得到了以下錯誤:
Environment:
Request Method: GET
Request URL: http://ec2-54-196-205-226.compute-1.amazonaws.com/
Django Version: 1.6.1
Python Version: 2.7.3
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'raudio')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')
Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
101. resolver_match = resolver.resolve(request.path_info)
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py" in resolve
320. sub_match = pattern.resolve(new_path)
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py" in resolve
222. return ResolverMatch(self.callback, args, kwargs, self.name)
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py" in callback
229. self._callback = get_callable(self._callback_str)
File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py" in wrapper
32. result = func(*args)
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py" in get_callable
96. mod = import_module(mod_name)
File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py" in import_module
40. __import__(name)
File "/home/ubuntu/public_html/clupus.com/clupus/raudio/views.py" in <module>
9. import spotify
File "/usr/local/lib/python2.7/dist-packages/spotify/__init__.py" in <module>
53. ext_package='spotify')
File "/usr/local/lib/python2.7/dist-packages/cffi/api.py" in verify
339. lib = self.verifier.load_library()
File "/usr/local/lib/python2.7/dist-packages/cffi/verifier.py" in load_library
73. self._write_source()
File "/usr/local/lib/python2.7/dist-packages/cffi/verifier.py" in _write_source
125. file = open(self.sourcefilename, 'w')
Exception Type: IOError at/
Exception Value: [Errno 2] No such file or directory: '/usr/local/lib/python2.7/dist-packages/spotify/__pycache__/_cffi__x3868ddbbx77caf6c5.c'
當我pip freeze
所有的依賴顯得遇到了在服務器上,我不知道是什麼問題是。有人有想法嗎?
該問題具體與pyspotify。嘗試重新安裝該軟件包? – yuvi
pyspotify-2.0.0a1位於何處?如果我嘗試點擊安裝您的requirements.txt,我會得到'找不到滿足要求pyspotify == 2.0.0a1的版本。如果它來自不同的存儲庫,則需要執行'pip install -f http://other.repo.com -r requirements.txt' – ptr
我一直在手動安裝'sudo pip install git + git:// github.com/mopidy/pyspotify.git'。現在,當我嘗試這樣做時,它會告訴我'命令'gcc'以退出狀態1'失敗。 – Nanor