Thursday, June 23, 2016

Re: Beginner question regarding virtualenv

Gary and Daniele,

Looks like setting-up virtual environments is the way to go. Thanks for your help. I'm glad I asked before really digging in to serious development.

Leo

On Thursday, June 23, 2016 at 3:06:16 PM UTC-4, gary719_list1 wrote:
On 06/23/2016 11:36 AM, Leo wrote:
Hi Leo,

The only problem with not using virtuaenv in your case is if you are still periodically updating your software. Since you are using the OS versions of python and django you are at the mercy of those upgrades. A switch from Django 1.8 to 1.9 could break your project - as an example. A switch from Python 2.7 to 3.5 will definitely break you project.  Also how you set up depends on what IDE you are using. If you are just working with your standard command line monitor then the virtual environment is fairly straight forward. Use virtualevwrapper for python 2.7 but I would suggest pyvenv for python 3. There are very good docs for those on the web. If you are using an IDE, things could get more complicated. I'm using Eclipse with PyDev and had fits with the setup. I finally created a virtual environment in my /opt/ directory and, using pip, loaded it with Python3.5 and Django 1.9. I never really open the virtualenv but just point to it in the IDE setup. This seems to work so far.

In short, be safe and setup a virtual environment. It will make migration easier as well.

Gary R.

Hey Everyone,


I'm a total newb to using Django and open stack. I am working on creating a Django development environment in a VMware environment/Ubuntu OS. Eventually I want to deploy this to production.  The site's purpose is as an intranet site.


I have been following the Django tutorial but recently discovered some other Django tutorials which led me to posting this question. I didn't create a Python vitrualenv rather installed everything at the root of the OS. I am unsure if this will cause me problems or if I can proceed with this approach. I do not plan to use the VM for anything else but this specific intranet site.


Thanks for your help.

LV

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f2afd0a2-9644-4818-98d5-85bad724cae6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b0ddb49d-0192-4121-959a-92e289f8cf26%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment