Python Path/Python SDK problems

For our developement we're using buildout. Buildout scripts are generating some executables for running python and django with custom paths inside them.

And so - we've got a bin/python script looking like this: http://dpaste.com/hold/195004/

And bin/djagno script looking like this: http://dpaste.com/hold/195005/

When I'm trying to set the interpreter for the project I'm unable to select my bin/python script - I got following error:

Error configuring SDK: Traceback (most recent call last):

  File "/Users/bx2/Dropbox/Projekty/django-moderation/bin/python", line 16, in <module>

    _options, _args = __import__("getopt").getopt(sys.argv[1:], 'ic:m:')

  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/getopt.py", line 91, in getopt

    opts, args = do_shorts(opts, args[0][1:], shortopts, args[1:])

  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/getopt.py", line 191, in do_shorts

    if short_has_arg(opt, shortopts):

  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/getopt.py", line 207, in short_has_arg

    raise GetoptError('option -%s not recognized' % opt, opt)

getopt.GetoptError: option -V not recognized

(exit code 1).

Please make sure that /Users/bx2/Dropbox/Projekty/django-moderation/bin/python is a valid home path for this SDK type.

I suppouse that Pycharm needs to get python version for the interpreter name, but is there any easy way to resolve that? Btw. in my opinion the user should

be able to name defined python interpreter like it is resolved in Netbeans Python EA (I know it has poor Django support, but there are no problems with

custom interpreter script.

Other thing is that I have separated folder for settings like so:

+ settings/

+--- __init__.py    <--- here I'm importing production/dev settings

+--- production.py

+--- developement.py

Pycharm is not allowing me to choose any of it - even settings module. I know that this problem was described once before and I know that Pycharm supports manage.py --settings=...,

but I have to use bin/django for running Django Server, so what are the steps to start this up, because there is nothing specific in the documentation.

Thans up front for help!

3 comments

Is here any support at all??!?!

0

Hello Bartosz,

Buildout isn't supported right now. We plan to provide full support for it

before 1.0, but it's not there yet.

The settings.py file selected in the settings dialog isn't used for running

Django applications right now. If you need to use a non-standard settings

file, you need to specify the --settings option in the Django run configuration

manually. This part will also be redesigned before the 1.0 release.

For our developement we're using buildout. Buildout scripts are

generating some executables for running python and django with custom

paths inside them.

And so - we've got a bin/python script looking like this:

http://dpaste.com/hold/195004/ And bin/djagno script looking like

this: http://dpaste.com/hold/195005/

When I'm trying to set the interpreter for the project I'm unable to

select my bin/python script - I got following error:

Error configuring SDK:

> Traceback (most recent call last):

> File "/Users/bx2/Dropbox/Projekty/django-moderation/bin/python",

> line 16, in <module>

> _options, _args = __import__("getopt").getopt(sys.argv[1:],

> 'ic:m:')

> File

> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/getop

> t.py", line 91, in getopt

> opts, args = do_shorts(opts, args[0][1:], shortopts, args[1:])

> File

> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/getop

> t.py", line 191, in do_shorts

> if short_has_arg(opt, shortopts):

> File

> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/getop

> t.py", line 207, in short_has_arg

> raise GetoptError('option -%s not recognized' % opt, opt)

> getopt.GetoptError: option -V not recognized

> (exit code 1).

> Please make sure that

> /Users/bx2/Dropbox/Projekty/django-moderation/bin/python is a valid

> home path for this SDK type.

I suppouse that Pycharm needs to get python version for the

interpreter name, but is there any easy way to resolve that?

Other thing is that I have separated folder for settings like so:

- settings

>

> +- __init__.py    <- here I'm importing production/dev settings

>

> +--- production.py

>

> +--- developement.py

Pycharm is not allowing me to choose any of it - even settings module.

I know that this problem was described once before and I know that

Pycharm supports manage.py --settings=...,

I have to use bin/django for running Django Server, so what are the

steps to start this up, because there is nothing specific in the

documentation.

Thans up front for help!

---

Original message URL:

http://www.jetbrains.net/devnet/message/5263305#5263305

--

Dmitry Jemerov

Development Lead

JetBrains, Inc.

http://www.jetbrains.com/

"Develop with Pleasure!"

0

Thank you! Now I'll know that I have to wait for final release.

0

Please sign in to leave a comment.