First time here? Check out the FAQ!
1

Help with the installation
 

Hi, I'm trying to install Askbot following the instructions, but when I write "python setup.py install" it gives me this:

running install
running build
running build_py
running install_lib
creating /usr/lib/python2.6/site-packages/recaptcha_django
error: could not create '/usr/lib/python2.6/site-packages/recaptcha_django': Permission denied

So I cannot install Django... Does anyone know why is this?

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Pepe's avatar
71
Pepe
asked 12 years ago, updated 12 years ago

Comments

@Pepe, @zaf is right you don't have permission to write to directory under /usr/. Use virtualenv tool and create the environment in the directory where you do have write permissions - anywhere in your user account will work.

Evgeny's avatar Evgeny (12 years ago)
see more comments

3 Answers

2

Maybe you re trying to install it on a machine that you do not have access rights everywhere, and when intallation tries to copy files under /usr/lib/python2.6/site-packages/ you get access denied. Try using virtualenv to install your application. The idea is that you set up a virtual environment in a path you have permissions (only a couple of steps, should take less than 5 minutes) which then has its own site-packages directory and everything is installed there, so you never need to write in other directories, outside this environment that you might not have enough permissions.

Hope that helps a bit..

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
zaf's avatar
512
zaf
answered 12 years ago
link

Comments

Thanks for your answer. Could it have something to do with I'm using Python 2.7? I'm trying to install virtualenv...

Pepe's avatar Pepe (12 years ago)

Strange.. Are you sure you are using Python 2.7? Maybe both are installed on the machine but the 2.6 one is on your PATH variable, so whenever you simply type e.g. python manage.py install it uses the 2.6 one.

Anyway, about virtualenv, you should only need something like:

easy_install virtualenv

cd path/where/you/want/to/install/askbot

virtualenv .

That should be all. After this step, you will have your project folder (say askbot_project) and next to it, a folder bin where all the necessary tools have been installed.

zaf's avatar zaf (12 years ago)

check this post too, maybe its helps

zaf's avatar zaf (12 years ago)
see more comments
0

Ok, I was trying to install all this straight to the server via PuTTY, I suppose I was wrong... I should have installed it on my computer first, shouldn't I?

I got to integrate the "easy_install" command in Windows and, for now, I could follow the instructions until the step 3. Now, when I try to run the "cp settings_local.py.dist settings_local.py", I get this:

cp: cannot stat settings_local.py.dist': No such file or directory

And here I am stuck again. Any idea?

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Pepe's avatar
71
Pepe
answered 12 years ago
link

Comments

Where did you find the "copy settings_local.py.dist", is this still somewhere in the docs? We don't have it. Instead we have command askbot-setup.

Evgeny's avatar Evgeny (12 years ago)
Pepe's avatar Pepe (12 years ago)

Sorry we need to shut down the wiki, we are not maintaining it. Please find the documentation from the link with the same name in the header on this side.

Evgeny's avatar Evgeny (12 years ago)

Well, I restart the installation following the documentation, but now the "askbot-setup" gives me «"askbot-setup" is not recognized as an internal or external command, program or batch file.»

Pepe's avatar Pepe (12 years ago)

that means the askbot-setup is not on your PATH, you could instead type the same command with the absolute path to the command prepended. With virtual environment (look up virtualenv for python) this problem should go away.

Evgeny's avatar Evgeny (12 years ago)
see more comments
0

The problem seems to be resolved using virtualenv, but now I get this when I run "askbot-setup" :

Traceback (most recent call last):
  File "C:\Users\Francisko\Whatzz\Scripts\askbot-setup-script.py", line 5, in <m
odule>
    from pkg_resources import load_entry_point
  File "C:\Users\Francisko\Whatzz\lib\site-packages\setuptools-0.6c11-py2.7.egg\
pkg_resources.py", line 2603, in <module>
  File "C:\Users\Francisko\Whatzz\lib\site-packages\setuptools-0.6c11-py2.7.egg\
pkg_resources.py", line 666, in require
  File "C:\Users\Francisko\Whatzz\lib\site-packages\setuptools-0.6c11-py2.7.egg\
pkg_resources.py", line 565, in resolve
pkg_resources.DistributionNotFound: python-daemon

Do you know anything about that? (Sorry about my ignorance...)

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Pepe's avatar
71
Pepe
answered 12 years ago
link

Comments

Your python seems to not have library python-daemon - try pip install python-daemon.

Evgeny's avatar Evgeny (12 years ago)

Try to use comments for follow-up. The Q&A format more strict, but helps reading the content. For one - your post here is not an answer.

Evgeny's avatar Evgeny (12 years ago)

Where am I supposed to install python-daemon?

Pepe's avatar Pepe (12 years ago)

@Evgeny, I'll keep it in mind. Sorry about that.

Pepe's avatar Pepe (12 years ago)

I've moved this question to a new post: http://askbot.org/en/question/7671/python-daemon-not-found

Pepe's avatar Pepe (12 years ago)
see more comments