askbot-devel icon indicating copy to clipboard operation
askbot-devel copied to clipboard

Getting a Traceback error when running askbot-setup

Open Lauren15468 opened this issue 6 years ago • 10 comments

I am trying to install askbot. I first followed the instructions here https://computingforgeeks.com/setup-askbot-ubuntu-18-04-with-nginx-and-letsencrypt-ssl/ but would get a similar error to below when I ran:

python manage.py collectstatic

and the fix they had didn't work. Then I try the instructions from here https://askbot.org/doc/install.html (steps are shown below), but still ran into the same error.

git clone git://github.com/ASKBOT/askbot-devel.git <project_name> git checkout 0.11.x sudo python3 setup.py develop

which both work but then I do: askbot-setup and I get

Traceback (most recent call last): File "/srv/askbot_2/venv/bin/askbot-setup", line 6, in from pkg_resources import load_entry_point File "/srv/askbot_2/venv/local/lib/python2.7/site-packages/pkg_resources/init.py", line 3250, in @_call_aside File "/srv/askbot_2/venv/local/lib/python2.7/site-packages/pkg_resources/init.py", line 3234, in _call_aside f(*args, **kwargs) File "/srv/askbot_2/venv/local/lib/python2.7/site-packages/pkg_resources/init.py", line 3263, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/srv/askbot_2/venv/local/lib/python2.7/site-packages/pkg_resources/init.py", line 583, in _build_master ws.require(requires) File "/srv/askbot_2/venv/local/lib/python2.7/site-packages/pkg_resources/init.py", line 900, in require needed = self.resolve(parse_requirements(requirements)) File "/srv/askbot_2/venv/local/lib/python2.7/site-packages/pkg_resources/init.py", line 786, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'responses>=0.9.0' distribution was not found and is required by askbot

I would get a similar error with python setup.py develop as well. I am using ubuntu 18.04

Any suggestions to fix this would be greatly appreciated.

Lauren15468 avatar Aug 23 '19 15:08 Lauren15468

@martin-bts any idea? Maybe https://pypi.org/project/responses/ is missing somehow?

sebastian-philipp avatar Aug 23 '19 15:08 sebastian-philipp

also may be important to note I did:

sudo python3 setup.py develop instead of sudo python setup.py develop so I wouldn't get the traceback error here too.

Lauren15468 avatar Aug 23 '19 15:08 Lauren15468

fyi, Askbot .0.11.x is no longer compatible to Python 2

sebastian-philipp avatar Aug 23 '19 16:08 sebastian-philipp

is there a working branch for ubuntu 18.04 ?

Lauren15468 avatar Aug 23 '19 16:08 Lauren15468

It would seem that in this case calling askbot-setup implicitly calls Python 2 which cannot work on the 0.11.x branch.

For using the 0.11.x branch I would suggest using the Dockerfile, i.e. a container. This has the highest chance of success. The installer is being rewritten at the moment and it will be a few weeks until we're done.

martin-bts avatar Aug 23 '19 18:08 martin-bts

oh ok. Is there a branch where a container isn't needed?

Lauren15468 avatar Aug 23 '19 18:08 Lauren15468

Yeah, I've been there, done that. I suggest deploying Askbot in a container. You just don't want to do the manual way.

sebastian-philipp avatar Aug 23 '19 19:08 sebastian-philipp

There are the master branch and the pypi package referred to in the computingforgeeks.com article.

I am a bit confused about the usage of sudo in the initial message. To me this looks like you are not using a virtual environment and therefore are not following the tutorial. Maybe using a virtual environment fixes the problem? A Python3 venv would be required for the 0.11.x branch. In my deployments I do (from the top of my head) :

  • install
  • askbot-setup
  • migrate
  • collectstatic

martin-bts avatar Aug 23 '19 21:08 martin-bts

As askbot-setup is virtually rewritten from scratch, we will not address this issue anymore. I suggest closing this.

martin-bts avatar Aug 23 '20 21:08 martin-bts

This refers to a piece of code that is no longer part of Askbot. I suggest closing this issue, because it is not relevant anymore.

martin-bts avatar Oct 29 '20 12:10 martin-bts