Monday, February 3, 2014

Re: virtualenv on Windows

You can easily install pillow on windows using 'easy_install pillow' it comes with the necessary binaries and you don't need to compile

On Feb 4, 2014 2:30 AM, "Mike Dewhirst" <miked@dewhirst.com.au> wrote:
Thanks Nick

All this goodness is coming to light just I have (almost) given up Windows altogether. I only need to persuade one more person on my network to walk away from Microsoft and I'm free! FREE!

Sob ...

Mike

On 4/02/2014 10:39am, Nick Santos wrote:
FYI, virtualenvwrapper was ported to windows:
https://pypi.python.org/pypi/virtualenvwrapper-win

It works seamlessly like the linux/OSX versions
-Nick<mailto:nick@enviroconsumer.org>



On Mon, Feb 3, 2014 at 3:10 PM, Mike Dewhirst <miked@dewhirst.com.au
 <mailto:miked@dewhirst.com.au>> wrote:

Michel

I learned quite a lot and appreciate it greatly!

Thankyou

Mike


On 4/02/2014 7:37am, werefrog wrote:

Hello,

For Windows, I tried many ways that worked but I finally installed
Visual Studio 2008 C++ for the compilation problems and only pillow
and psycopg2 resist in my case (I simply extract the content of the
binaries from http://www.lfd.uci.edu/~__gohlke/pythonlibs/
<http://www.lfd.uci.edu/~gohlke/pythonlibs/>, copy content from
'SCRIPTS' to project's virtualenv 'Scripts' and 'PLATLIB' to
project's virtualven 'Lib/site-packages'; I'll give a try to the
easy_install with them, thank you).

While speaking of psycopg2, I spent a ridiculous amount of time
struggling with postgresql installation on Windows to finally
discover that you should stick to ASCII for the password chosen on
this platform. (Yes, I missed some warning).

You can use virtualenvwrapper-win on Windows. The documentation is
short and efficient but here is some basic steps, begining from
install:

pip install -U virtualenv pip install -U virtualenvwrapper-win

You have to set WORKON_HOME environment variable to to directory
where will be grouped your virtualenvs to make it convenient.

Update pip and setuptools:

easy_install -U pip pip install -U setuptools

Then, create your virtualenv:

mkvirtualenv myproject

Activate the virtualenv (you will then be on
%WORKON_HOME%/myproject/):

workon myproject

I keep projects in their own directory independant from virtualenv.
To add your project directory to its virualenv's pythonpath, use the
following command where <path> can be full or relative:

setprojectdir <path>

Now, install your requirements:

pip install -r requirements.txt

You can use cdproject and cdvirtualenv commands to go to project and
virtualenv directories.

To go back to the 'general' environment, just type:

deactivate

Additional details you probably already know: remember to not rely
on the registry to execute your python scripts :) for example:

python manage.py runserver

and not:

manage.py runserver

Edit you virtualenv's Script\activate.bat to add any other specific
environment variables and don't forget .pth files for specific python
path.

That's all for today!

Regards, Michel


-- 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
<mailto:django-users%2Bunsubscribe@googlegroups.com>. To post to this
group, send email to django-users@googlegroups.com
<mailto:django-users@googlegroups.com>. Visit this group at
http://groups.google.com/__group/django-users
<http://groups.google.com/group/django-users>. To view this
discussion on the web visit
https://groups.google.com/d/__msgid/django-users/52F021F0.__1050004%40dewhirst.com.au


<https://groups.google.com/d/msgid/django-users/52F021F0.1050004%40dewhirst.com.au>.

For more options, visit https://groups.google.com/__groups/opt_out
<https://groups.google.com/groups/opt_out>.


-- 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
http://groups.google.com/group/django-users. To view this discussion
on the web visit
https://groups.google.com/d/msgid/django-users/CAM1S3vC2v9Hb-PgMZXwH0N_yTzZdy1TgcJ7X20VGNu-8mMatvA%40mail.gmail.com.


For more options, visit https://groups.google.com/groups/opt_out.

--
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/52F0348D.90102%40dewhirst.com.au.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAFWa6tJcm6OwEPTqUuWrr2irPDB4aExctF4tT2U7oF5QtH0mLQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment