How do you install ?
is there a documentation that shows how you actually install it ?
http://askbot.org/doc/install.html
http://askbot.org/doc/install.html
Unfortunately, this doesn't work as advertised. Tried the pip install method on a Mac OS X Mavericks 10.9.5. Had the support of an experienced Py-programmer, who had previously installed hundreds of other Django-based web apps on various systems....
He tried various things, but couldn't get around some weird debugging error displayed in the web interface. (Sorry, can't remember the details right now...)
I'll try the install-from-github-method next. When I do, I'll take note of every single command and every error message I encounter, and open appropriate issues here... (some of these issues will probably be dumb, since I'm a very new Python software/frameworks "installer" -- but hopefully it will help to get the documentation into a better shape).
Hello Kurt,
Would be great if the programmer you worked with could describe the issues.
If this is due to the versions of dependency packages, these should mostly be gone as in the next version all dependency versions will be frozen.
On Fri, May 29, 2015 at 1:51 PM, Kurt Pfeifle [email protected] wrote:
http://askbot.org/doc/install.html
Unfortunately, this doesn't work as advertised. Tried the pip install method on a Mac OS X Mavericks 10.9.5. Had the support of an experienced Py-programmer, who had previously installed hundreds of other Django-based web apps on various systems....
He tried various things, but couldn't get around some weird debugging error displayed in the web interface. (Sorry, can't remember the details right now...)
I'll try the install-from-github-method next. When I do, I'll take note of every single command and every error message I encounter, and open appropriate issues here... (some of these issues will probably be dumb, since I'm a very new Python software/frameworks "installer" -- but hopefully it will help to get the documentation into a better shape).
— Reply to this email directly or view it on GitHub https://github.com/ASKBOT/askbot-devel/issues/451#issuecomment-106869359 .
Askbot Valparaiso, Chile skype: evgeny-fadeev
Hi, I did a quick try with Kurt and we just did pip install askbot into a virtualenv. We followed the docs and there were quite some errors / warnings when trying to run askbot with django's runserver. Maybe just try that yourself?
So, I'm installing a DEV version from scratch, using a VirtualEnv inside a Ubuntu 14.04.3. I'll use this message to report the errors (and difficulties) I'm finding. Hope this helps.
Python-dev
After creating a virtual-env with a python2.7 I ran the setup script and it broke with some messages like this: fatal error:
(...) Python.h: No such file or directory (...) #include "Python.h"
This means my computer was lacking the "python-dev" package!
PostgreSQL roles
In the commands related to role creation, maybe you should more clearly state the parts that should be re-written, avoiding that the ADMIN (i.e. ME) COPY and RUN the commands without rewriting it! For example:
create role <<USER>> with createdb login encrypted password '<<PASSWORD>>';
Also, I've found that the symbol (`) didn't work for me... I had to substitute that with (').
SYNC_DB
I could not make it work because of some version problem regarding "pytz==2013b". It looks like when installing that, PIP is "normalizing" the name for "pytz==2013b0", then I get:
Unsupported version of module pytz,
found version 2013b0, pytz==2013b required.
I tried to solve this by changing the "requirements" file, but it looks like this file is not being read when "sync_db" is executed. To bypass this, I added a "ASKBOT_SELF_TEST = False" to the "settings".
I cannot install it on Ubuntu 16.10:
sudo python2.7 setup.py develop
running develop
running egg_info
writing requirements to askbot.egg-info/requires.txt
writing askbot.egg-info/PKG-INFO
writing top-level names to askbot.egg-info/top_level.txt
writing dependency_links to askbot.egg-info/dependency_links.txt
writing entry points to askbot.egg-info/entry_points.txt
reading manifest file 'askbot.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: manifest_maker: MANIFEST.in, line 10: 'recursive-exclude' expects <dir> <pattern1> <pattern2> ...
no previously-included directories found matching 'dist'
no previously-included directories found matching 'tmp'
no previously-included directories found matching 'build'
no previously-included directories found matching 'static'
no previously-included directories found matching 'django'
no previously-included directories found matching 'lamson'
warning: no previously-included files found matching 'db'
warning: no previously-included files found matching 'lint'
warning: no previously-included files found matching 'settings.py'
warning: no previously-included files found matching 'manage.py'
warning: no previously-included files found matching '__init__.py'
warning: no previously-included files found matching 'urls.py'
warning: no previously-included files found matching 'rebuild-locales.pl'
warning: no previously-included files found matching 'askbot/upfiles/avatars/*'
warning: manifest_maker: MANIFEST.in, line 26: 'recursive-exclude' expects <dir> <pattern1> <pattern2> ...
warning: no previously-included files matching '*' found under directory 'avatar'
warning: no previously-included files matching '*' found under directory 'adzone'
warning: no previously-included files matching '*' found under directory 'custom_settings'
warning: no previously-included files matching '*' found under directory 'custom'
warning: no previously-included files matching '*' found under directory 'follow'
warning: no previously-included files matching '*' found under directory 'categories'
warning: no previously-included files matching '*' found under directory 'follow'
warning: no previously-included files matching '*' found under directory 'env'
warning: manifest_maker: MANIFEST.in, line 35: 'recursive-exclude' expects <dir> <pattern1> <pattern2> ...
writing manifest file 'askbot.egg-info/SOURCES.txt'
running build_ext
Creating /usr/local/lib/python2.7/dist-packages/askbot.egg-link (link to .)
askbot 0.10.1 is already the active version in easy-install.pth
Installing askbot-setup script to /usr/local/bin
Installed /home/asabzevari/h5/zstack
Processing dependencies for askbot==0.10.1
Searching for python-daemon
Reading https://pypi.python.org/simple/python-daemon/
Downloading https://pypi.python.org/packages/b2/fb/a280d65f81e9d69989c8d6c4e0bb18d7280cdcd6d406a2cc3f4eb47d4402/python-daemon-2.1.2.tar.gz#md5=9c57343d81f2a96c51cffeab982b04d2
Best match: python-daemon 2.1.2
Processing python-daemon-2.1.2.tar.gz
Writing /tmp/easy_install-opzmA4/python-daemon-2.1.2/setup.cfg
Running python-daemon-2.1.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-opzmA4/python-daemon-2.1.2/egg-dist-tmp-8z43XO
Traceback (most recent call last):
File "setup.py", line 122, in <module>
(**) - With MySQL you have to use MyISAM data backend, because it's the only one that supports Full Text Search."""
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "build/bdist.linux-x86_64/egg/setuptools/command/develop.py", line 36, in run
File "build/bdist.linux-x86_64/egg/setuptools/command/develop.py", line 137, in install_for_development
File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 746, in process_distribution
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 846, in resolve
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 1118, in best_match
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 1130, in obtain
File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 673, in easy_install
File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 699, in install_item
File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 880, in install_eggs
File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 1119, in build_and_install
File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 1105, in run_setup
File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 258, in run_setup
File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 198, in setup_context
File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 169, in save_modules
File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 144, in resume
File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 157, in save_modules
File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 198, in setup_context
File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 255, in run_setup
File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 285, in run
File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 253, in runner
File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 47, in _execfile
File "/tmp/easy_install-opzmA4/python-daemon-2.1.2/setup.py", line 86, in <module>
File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/tmp/easy_install-opzmA4/python-daemon-2.1.2/version.py", line 640, in __init__
File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 316, in __init__
File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 371, in fetch_build_eggs
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 846, in resolve
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 1118, in best_match
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 1130, in obtain
File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 437, in fetch_build_egg
File "/usr/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
self.finalize_options()
File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 250, in finalize_options
File "/tmp/easy_install-opzmA4/python-daemon-2.1.2/version.py", line 656, in get_version
File "/tmp/easy_install-opzmA4/python-daemon-2.1.2/version.py", line 651, in get_version_info
File "/tmp/easy_install-opzmA4/python-daemon-2.1.2/version.py", line 552, in get_changelog_path
File "/usr/lib/python2.7/posixpath.py", line 122, in dirname
i = p.rfind('/') + 1
AttributeError: 'NoneType' object has no attribute 'rfind'
Any ideas?
@alisabzevari this issue is https://pagure.io/python-daemon/issue/2 . They suggest that this is linked to something in setuptools - so try "pip install -U setuptools".
I used to see this, but cannot reproduce on my systems - this must be solvable by pinning version of some dependency (which in this case is a nested dependency and hard to track down without being able to reproduce the issue).
Back then I was able to solve it by typing "pip install Lamson" manually - this brings python-daemon as dependency, then rerun install of askbot.
@evgenyfadeev Yes, Fixed my problem. Thanks.
@alisabzevari what command was the fix? Somebody asked the same question on the forum so I want to help them too.
@evgenyfadeev Hard to tell :wink:
My pip command was actually pip3. So I fixed it. Then I installed python-daemon manually using pip install python-daemon.
I'm able to reproduce the problem using
pip install --install-option="--prefix=/root/folder" python-deamon
If you use --prefix as install options, pip fails, omitting the instal option pip completes with no error. So the question is what happen when I'm using the --prefix ? Is here a fix for this ?
Hello Friends, @evgenyfadeev :
I'm working with Evgeny separately, but out of curiosity I tried to install AskBot from the PyPI repository on my Fedora-26 laptop (again, just out of curiosity). Everything was going well until I ran into the below issue, for which I pasted step-by-step commands that I issued. I also pasted pip freeze output.
See below. I thought I'd alert the community out of courtesy. =:)
Thank you, Noelle
# Create the virtual environment.
user@fedora26$ mkvirtualenv -p /usr/bin/python2.7 askbot
Running virtualenv with interpreter /usr/bin/python2.7
New python executable in /home/user/.virtualenvs/askbot/bin/python2.7
Also creating executable in /home/user/.virtualenvs/askbot/bin/python
Installing setuptools, pip, wheel...done.
virtualenvwrapper.user_scripts creating /home/user/.virtualenvs/askbot/bin/predeactivate
virtualenvwrapper.user_scripts creating /home/user/.virtualenvs/askbot/bin/postdeactivate
virtualenvwrapper.user_scripts creating /home/user/.virtualenvs/askbot/bin/preactivate
virtualenvwrapper.user_scripts creating /home/user/.virtualenvs/askbot/bin/postactivate
virtualenvwrapper.user_scripts creating /home/user/.virtualenvs/askbot/bin/get_env_details
Done.
# Activate the virtual environment.
user@fedora26$ workon askbot
(askbot) user@fedora26$
# Verify the virtual environment.
(askbot) user@fedora26$ which python
~/.virtualenvs/askbot/bin/python
(askbot) user@fedora26$ python -V
Python 2.7.13
(askbot) user@fedora26$ which pip
~/.virtualenvs/askbot/bin/pip
# Install askbot Python-2 packages ...
(askbot) user@fedora26$ pip install askbot
Collecting askbot
[ ... snip ... ]
Successfully installed Coffin-0.3.8 Jinja2-2.8 MarkupSafe-1.0 Pillow-4.3.0 akismet-0.2.0 amqp-1.4.9 anyjson-0.3.3 askbot-0.10.2 beautifulsoup4-4.4.1 billiard-3.3.0.23 celery-3.1.18 django-1.8.18 django-appconf-1.0.2 django-avatar-2.2.1 django-celery-3.1.17 django-compressor-1.5 django-countries-3.3 django-followit-0.2.1 django-keyedcache-1.5.1 django-kombu-0.9.4 django-picklefield-0.3.0 django-recaptcha-1.0.5 django-robots-1.1 django-threaded-multihost-1.4.post1 django-tinymce-1.5.3 html5lib-0.9999999 httplib2-0.10.3 jsonfield-1.0.3 kombu-3.0.37 markdown2-2.3.1 mock-1.0.1 oauth2-1.9.0.post1 olefile-0.44 pyjwt-1.4.0 pystache-0.3.1 python-cas-1.1.0 python-openid-2.2.5 pytz-2016.4 regex-2017.9.23 requirements-parser-0.1.0 sanction-0.3.1 simplejson-3.8.2 six-1.11.0 unidecode-0.4.19
[ ... snip ... ]
# See pip freeze output further below.
(askbot) user@fedora26$ mkdir ./askbot-live
(askbot) user@fedora26$ cd ./askbot-live
(askbot) user@fedora26$ pwd
/home/user/askbot-live
(askbot) user@fedora26$ which askbot-setup
~/.virtualenvs/askbot/bin/askbot-setup
# Initial configuration of askbot ...
(askbot) user@fedora26$ askbot-setup
Deploying Askbot - Django Q&A forum application
Problems installing? -> please email [email protected]
To CANCEL - hit Ctr-C at any time
Enter directory path (absolute or relative) to deploy
askbot. To choose current directory - enter "."
> .
Please select database engine:
1 - for postgresql, 2 - for sqlite, 3 - for mysql, 4 - oracle
type 1/2/3/4: 2
Please enter database file name
> askbot.sqlite.db
Copying files:
* __init__.py
* manage.py
* urls.py
* django.wsgi
Creating settings file
settings file created
copying directories: * doc
* cron
* upfiles
Done. Please find further instructions at http://askbot.org/doc/
(askbot) user@fedora26$ ls -l
drwxr-xr-x 4 user user 4096 Oct 5 18:50 .
drwx------. 69 user user 4096 Oct 5 18:49 ..
drwxr-xr-x 5 user user 4096 Oct 5 18:50 askbot
-rw-r--r-- 1 user user 703 Oct 5 18:50 django.wsgi
-rw-r--r-- 1 user user 0 Oct 5 18:50 __init__.py
drwxr-xr-x 2 user user 4096 Oct 5 18:50 log
-rw-r--r-- 1 user user 242 Oct 5 18:50 manage.py
-rw-r--r-- 1 user user 8688 Oct 5 18:50 settings.py
-rw-r--r-- 1 user user 1568 Oct 5 18:50 urls.py
This is where the problem occurs ...:
(askbot) user@fedora26$ python manage.py collectstatic
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/user/.virtualenvs/askbot/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
utility.execute()
File "/home/user/.virtualenvs/askbot/lib/python2.7/site-packages/django/core/management/__init__.py", line 328, in execute
django.setup()
File "/home/user/.virtualenvs/askbot/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/user/.virtualenvs/askbot/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate
app_config.import_models(all_models)
File "/home/user/.virtualenvs/askbot/lib/python2.7/site-packages/django/apps/config.py", line 198, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/home/user/.virtualenvs/askbot/lib/python2.7/site-packages/askbot/models/__init__.py", line 2, in <module>
startup_procedures.run()
File "/home/user/.virtualenvs/askbot/lib/python2.7/site-packages/askbot/startup_procedures.py", line 1086, in run
run_startup_tests()
File "/home/user/.virtualenvs/askbot/lib/python2.7/site-packages/askbot/startup_procedures.py", line 1012, in run_startup_tests
test_modules()
File "/home/user/.virtualenvs/askbot/lib/python2.7/site-packages/askbot/startup_procedures.py", line 289, in test_modules
try_import(mod_name, pip_path)
File "/home/user/.virtualenvs/askbot/lib/python2.7/site-packages/askbot/startup_procedures.py", line 209, in try_import
load_module(module_name)
File "/home/user/.virtualenvs/askbot/lib/python2.7/site-packages/askbot/utils/loading.py", line 23, in load_module
return __import__(mod_path, globals(), locals(), [], -1)
File "/home/user/.virtualenvs/askbot/lib/python2.7/site-packages/picklefield/__init__.py", line 5, in <module>
from picklefield.fields import PickledObjectField # reexport
File "/home/user/.virtualenvs/askbot/lib/python2.7/site-packages/picklefield/fields.py", line 79, in <module>
class PickledObjectField(_get_subfield_superclass()):
File "/home/user/.virtualenvs/askbot/lib/python2.7/site-packages/django/db/models/fields/subclassing.py", line 24, in __new__
new_class = super(SubfieldBase, cls).__new__(cls, name, bases, attrs)
TypeError: Error when calling the metaclass bases
metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
# Working Python-2 environment.
(askbot) user@fedora26$ pip freeze | sort
akismet==0.2.0
amqp==1.4.9
anyjson==0.3.3
askbot==0.10.2
beautifulsoup4==4.4.1
billiard==3.3.0.23
celery==3.1.18
Coffin==0.3.8
Django==1.8.18
django-appconf==1.0.2
django-avatar==2.2.1
django-celery==3.1.17
django-compressor==1.5
django-countries==3.3
django-followit==0.2.1
django-keyedcache==1.5.1
django-kombu==0.9.4
django-picklefield==0.3.0
django-recaptcha==1.0.5
django-robots==1.1
django-threaded-multihost==1.4.post1
django-tinymce==1.5.3
html5lib==0.9999999
httplib2==0.10.3
Jinja2==2.8
jsonfield==1.0.3
kombu==3.0.37
markdown2==2.3.1
MarkupSafe==1.0
mock==1.0.1
oauth2==1.9.0.post1
olefile==0.44
Pillow==4.3.0
PyJWT==1.4.0
pystache==0.3.1
python-cas==1.1.0
python-openid==2.2.5
pytz==2016.4
regex==2017.9.23
requirements-parser==0.1.0
sanction==0.3.1
simplejson==3.8.2
six==1.11.0
Unidecode==0.4.19
That was fixed here already #735 . If you do an pip install six==1.10.0 after the askbot-setup it should work fine. Otherwise you have to wait until the package on pip was updated.
Hi @MarcJose ,
I performed the above ( pip install six==1.10.0 ) and was able to proceed without issue.
Thank you!
Hello:
What callback URL pattern should one use when creating applications on Social Media Sites for authentication purposes? Something like this? (using Twitter as this example):
http://www.example.com/accounts/twitter/login/callback/
Or something else? And will it change from provider to provider?
Thank you!
I think this issue can be closed @evgenyfadeev . @nmvega questions can be moved to another issue or (maybe better) askbot.org?
Sure. You can close it. Thank you for the heads up. :)
That was fixed here already #735 . If you do an
pip install six==1.10.0after theaskbot-setupit should work fine. Otherwise you have to wait until the package on pip was updated.
I tried this solution but it does not work.