ASKBOT / askbot-devel

Askbot is a Django/Python Q&A forum. **Contributors README**: https://github.com/ASKBOT/askbot-devel#how-to-contribute. Commercial hosting of Askbot and support are available at https://askbot.com
Other
1.56k stars 628 forks source link

Getting a Traceback error when running askbot-setup #839

Open Lauren15468 opened 5 years ago

Lauren15468 commented 5 years ago

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 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.

sebastian-philipp commented 5 years ago

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

Lauren15468 commented 5 years ago

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.

sebastian-philipp commented 5 years ago

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

Lauren15468 commented 5 years ago

is there a working branch for ubuntu 18.04 ?

martin-bts commented 5 years ago

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.

Lauren15468 commented 5 years ago

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

sebastian-philipp commented 5 years ago

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

martin-bts commented 5 years ago

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) :

martin-bts commented 4 years ago

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

martin-bts commented 3 years ago

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.