akun / pyhackernews Goto Github PK
View Code? Open in Web Editor NEWHacker News written in Python
Home Page: assert.do
License: MIT License
Hacker News written in Python
Home Page: assert.do
License: MIT License
Downloading/unpacking MySQL-python==1.2.5 (from -r requirements/prod.txt (line 3))
Downloading MySQL-python-1.2.5.zip (108Kb): 108Kb downloaded
Running setup.py egg_info for package MySQL-python
sh: 1: mysql_config: not found
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/opt/PyHackerNews/venv/build/MySQL-python/setup.py", line 17, in <module>
metadata, options = get_config()
File "setup_posix.py", line 43, in get_config
libs = mysql_config("libs_r")
File "setup_posix.py", line 25, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found
Complete output from command python setup.py egg_info:
sh: 1: mysql_config: not found
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/opt/PyHackerNews/venv/build/MySQL-python/setup.py", line 17, in <module>
metadata, options = get_config()
File "setup_posix.py", line 43, in get_config
libs = mysql_config("libs_r")
File "setup_posix.py", line 25, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found
----------------------------------------
是否把libmysqlclient-dev也加入到requirements
然后我在项目里似乎没找到使用MySQLdb的文件?
执行make的时候无法通过make lint
make lint
make[1]: Entering directory '/opt/www/hackernews'
pylint --rcfile=.pylintrc --load-plugins pylint_django -E src/pyhn
************* Module pyhn.apps.news.tests.test_comment
src/pyhn/apps/news/tests/test_comment.py:36: [E1101(no-member), AnonymousCommentTestCase.test_comment_post_failed] Instance of 'HttpResponse' has no 'url' member
src/pyhn/apps/news/tests/test_comment.py:36: [E1101(no-member), AnonymousCommentTestCase.test_comment_post_failed] Instance of 'HttpResponseServerError' has no 'url' member
src/pyhn/apps/news/tests/test_comment.py:36: [E1101(no-member), AnonymousCommentTestCase.test_comment_post_failed] Instance of 'HttpResponseNotFound' has no 'url' member
Makefile:23: recipe for target 'lint' failed
make[1]: *** [lint] Error 2
make[1]: Leaving directory '/opt/www/hackernews'
Makefile:7: recipe for target 'all' failed
make: *** [all] Error 2
安装完毕后执行make run报错
(venv)root@li704-112:/opt/www/hackernews# make run
cd src && python manage.py runserver 0.0.0.0:
Traceback (most recent call last):
File "manage.py", line 13, in <module>
execute_from_command_line(sys.argv)
File "/opt/www/hackernews/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
utility.execute()
File "/opt/www/hackernews/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/www/hackernews/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 261, in fetch_command
commands = get_commands()
File "/opt/www/hackernews/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 107, in get_commands
apps = settings.INSTALLED_APPS
File "/opt/www/hackernews/venv/local/lib/python2.7/site-packages/django/conf/__init__.py", line 54, in __getattr__
self._setup(name)
File "/opt/www/hackernews/venv/local/lib/python2.7/site-packages/django/conf/__init__.py", line 49, in _setup
self._wrapped = Settings(settings_module)
File "/opt/www/hackernews/venv/local/lib/python2.7/site-packages/django/conf/__init__.py", line 132, in __init__
% (self.SETTINGS_MODULE, e)
ImportError: Could not import settings 'pyhn.settings.local' (Is it on sys.path? Is there an import error in the settings file?): No module named local
Makefile:45: recipe for target 'run' failed
vim src/pyhn/settings/local.py
python src/manage.py syncdb --noinput
python src/manage.py collectstatic --noinput
后两行命令会被输入到 vim 中
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.