Vagrant, Pycharm and Django - setup for newbies
Hello,
I've lost a great deal of time for the last 4 days trying to get the thing to work.
So i'm asking can anybody please point me to a solid tutorial about pycharm/vagrant/django setup. The quick tutorials tackle the issues separately, and i'm not interested in running a simple script through an SSH, i want a full django environment, with latest python and django distribution on a vagrant VM.
U'm also really frustrated with the lack of information when i press the run button. Nothing seems to happen, no output whatsoever.
For the last 4 days i made my own vagrant file, i customized the chef cookbook, I played with every possible combination of debug settings, i created a virtualenv on vm, I press the run button and absolutely nothing happens.
I can put some screenshots here if you want, but it would be really great if there was a nice step by step tutorial of setting up all of this.
And i'm a huge fan of your work as a company, love Resharper and Pycharm looks really cool.
Cheers!
I've lost a great deal of time for the last 4 days trying to get the thing to work.
So i'm asking can anybody please point me to a solid tutorial about pycharm/vagrant/django setup. The quick tutorials tackle the issues separately, and i'm not interested in running a simple script through an SSH, i want a full django environment, with latest python and django distribution on a vagrant VM.
U'm also really frustrated with the lack of information when i press the run button. Nothing seems to happen, no output whatsoever.
For the last 4 days i made my own vagrant file, i customized the chef cookbook, I played with every possible combination of debug settings, i created a virtualenv on vm, I press the run button and absolutely nothing happens.
I can put some screenshots here if you want, but it would be really great if there was a nice step by step tutorial of setting up all of this.
And i'm a huge fan of your work as a company, love Resharper and Pycharm looks really cool.
Cheers!
Please sign in to leave a comment.
The screen cast is great, but it really doesn't answer the question about
setting up the environment. I see that some people are using it the way i
want to, but i don't see any resources about it
On Wed, Apr 3, 2013 at 4:04 PM, Dmitry Filippov - PyCharm <
jetforum@jetbrains.com> wrote:
thank you for your queries.
So here we have several tutorials/screencasts you may be interested in:
Django development with PyCharm:
http://tv.jetbrains.net/videocontent/django-development-with-pycharm
almost the same, but in textual form:
http://www.jetbrains.com/pycharm/quickstart/django_guide.html
and Vagrant/SSH specific tutorial:
http://www.jetbrains.com/pycharm/quickstart/configuring_for_vm.html
probably that's all we have at the moment.
About environment setup on vm: http://www.jetbrains.com/pycharm/quickstart/configuring_for_vm.html -this one should suffice.
Basically we have notion of "remote interpreter". So once you will configure it with your vagrant box: http://www.jetbrains.com/pycharm/quickstart/configuring_interpreter.html
the rest is the same as for local interpreters.
And at this point you can use
http://tv.jetbrains.net/videocontent/django-development-with-pycharm
Unfortunately we don't have dedicated tutorial with mix of django and vagrant usage.
Thank you for asking that. I definitely will trigger creation of such a tutorial.
By the way, i'm curious why, when you pressing run button nothing happens...
Could you provide screen shots of what happens after pressing run button?
1. how to set up debugging settings for django
2. best practices for placing files and projects on vagrant
3. should i have a vagrant per project or 1 vagrant for all projects
4. using specific python version on my vagrant machine
5. setting up VagrantFile properly, and so on and so on...
Honestly, the only thing i would really need is a project i can download that works so i can play around with it. The information on the net is terribly scattered and hard to make sense of for a newcomer. But i love the concept, i think it's definitely really worth the trouble even for you guys. With a proper VagrantFile and a VM you would single handedly kill a ton of environment specific issues.
you are right, questions mentioned are not covered in these tutorials, but should be... I am going to put it into development.
However, lets solve your particular problem first, so maybe we will get more exact picture on what we are missing in tutorials.
Could you describe what have you done already step by step? Set up vagrant environment, configuring remote interpreter on vagrant box, create Django project with default interpreter = remote interpreter on vagrant box?
It is weird that on run button you get nothing... Probably some bug? lets figure out!
But something fishy is going on there, it shows me unresolved reference errors
I can start the project in vagrant through console
My settings in debug config are following (i tried all sorts of combinations).
and my interpreter settings are following
When i press run the button goes gray (pressed) for a second or 2, and then nothing. I don't see any output whatsoever
Hope this is enough info.
The vm is lucid32, and my operating system is windows 8
idea.log (565KB)
Vagrantfile (5.3KB)
The fix will be available in PyCharm 2.7.2, that should be available this week.
Hope you like it!
http://www.run80.net/?p=257
great! it is nice and comprehensive... But... I'm just curious... Why you did all your setup manually? I mean virtualenv, django... and such "django-admin.py startproject DjangoTest /vagrant"... hmm... It seems like you are not getting the most out of PyCharm((( Did you know that PyCharm can install Django and create virtualenv for you in couple clicks? And you can run/debug django projects from PyCharm as well...
But i don't actually mind this aproach, i'm not yet totally into python development but i like the fact that anyone can pull my project and set up a vagrant enviroment with running just one script after "up".
I would also like to steer your attention to the 2 issues I encountered (i'm not sure if it's a vagrant bug or a pycharm bug):
1. For some reason name of the machine in the generated vagrantfile contains “(virtualbox)” sufix, open up VagrantFile and delete that before uping vagrant. the line should be config.vm.box = “lucid32″ after correction.
2. After “fill from vagrant config” step you will probably get “Private key not found” exception. Download a PuttyGen tool from following link: http://the.earth.li/~sgtatham/putty/latest/x86/puttygen.exe
start it File->”load Key” and select the key c/users/you/.vagrant.d/insecure_private_key (have All files filter selected)
Then go file->save private key, and save it in the location you prefer. Then point to it in the pycharm vagrant dialog box instead of that unsecured_private_key.
I believe there's a lot of room for progress and untapped power in the pycharm-vagrant combination. There's still an issue of destroying the database data when destroying the vagrant (i haven't found good resources about that issue on the net), having multiple projects using one vagrant, maybe even one project using multiple vagrants (but that would be an overkill for me:).
But i really love the fact that i'm using a familiar tools and GUI for developing, and testing and debugging on Linux. Makes it real easy to follow all those python tutorials:).