librelist archives

« back to archive

How can i install flask in the microblog directory?

How can i install flask in the microblog directory?

From:
luofeiyu
Date:
2014-08-18 @ 01:30
I am a newbie to flask,now i am reading the tutorial

http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world


    Installing Flask

Okay, let's get started!

If you haven't yet, go ahead and install Python 2.7 
<http://python.org/download/>.

Now we have to install Flask and several extensions that we will be 
using. My preferred way to do this is to create a virtual environment 
<http://pypi.python.org/pypi/virtualenv> where everything gets 
installed, so that your main Python installation is not affected. As an 
added benefit, you won't need root access to do the installation in this 
way.

So, open up a terminal window, choose a location where you want your 
application to live and create a new folder there to contain it. Let's 
call the application folder |microblog|.

Next, download virtualenv.py 
<https://raw.github.com/pypa/virtualenv/1.9.X/virtualenv.py> and put it 
inside the new folder.

To create the virtual environment enter the following command:

|python virtualenv.py flask|

The above command creates a complete Python environment inside the 
|flask| folder.  You now have a |flask| sub-folder inside your 
|microblog| folder.

I can't do as the web say.

1.  my system is win7 amd 64 +python3.4 (d:\Python34).

2. I have installed flask from 
http://www.lfd.uci.edu/~gohlke/pythonlibs/  (amd64 python34 version)
My flask is in D:\Python34\Lib\site-packages\flask-0.10.1-py3.4.egg\flask
3. I have installed virtualenv from 
http://www.lfd.uci.edu/~gohlke/pythonlibs/  (amd64 python34 version)
My virtualenv is in 
D:\Python34\Lib\site-packages\virtualenv-1.11.6-py3.4.egg-info
4. I have build g:\microblog  .

how can i  install  flask in the g:\microblog\flask? can i copy 
D:\Python34\Lib\site-packages\flask-0.10.1-py3.4.egg\flask into 
g:\microblog\flask?

Re: [flask] How can i install flask in the microblog directory?

From:
王国真
Date:
2014-08-18 @ 05:38
better use virtualenv2.
On Aug 18, 2014 9:34 AM, "luofeiyu" <elearn2014@gmail.com> wrote:

>  I am a newbie to flask,now i am reading the tutorial
>
>
> http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world
>
> Installing Flask
>
> Okay, let's get started!
>
> If you haven't yet, go ahead and install Python 2.7
> <http://python.org/download/>.
>
> Now we have to install Flask and several extensions that we will be using.
> My preferred way to do this is to create a virtual environment
> <http://pypi.python.org/pypi/virtualenv> where everything gets installed,
> so that your main Python installation is not affected. As an added benefit,
> you won't need root access to do the installation in this way.
>
> So, open up a terminal window, choose a location where you want your
> application to live and create a new folder there to contain it. Let's call
> the application folder microblog.
>
> Next, download virtualenv.py
> <https://raw.github.com/pypa/virtualenv/1.9.X/virtualenv.py> and put it
> inside the new folder.
>
> To create the virtual environment enter the following command:
>
> python virtualenv.py flask
>
> The above command creates a complete Python environment inside the flask
> folder.  You now have a flask sub-folder inside your microblog folder.
>
> I can't do as the web say.
>
> 1.  my system is win7 amd 64 +python3.4 (d:\Python34).
>
> 2. I have installed flask from  http://www.lfd.uci.edu/~gohlke/pythonlibs/
> (amd64 python34 version)
> My flask is in  D:\Python34\Lib\site-packages\flask-0.10.1-py3.4.egg\flask
> 3. I have installed virtualenv from
> http://www.lfd.uci.edu/~gohlke/pythonlibs/  (amd64 python34 version)
> My virtualenv is in
> D:\Python34\Lib\site-packages\virtualenv-1.11.6-py3.4.egg-info
> 4. I have build g:\microblog  .
>
> how can i  install  flask in the g:\microblog\flask? can i copy
> D:\Python34\Lib\site-packages\flask-0.10.1-py3.4.egg\flask into
> g:\microblog\flask?
>

Re: [flask] How can i install flask in the microblog directory?

From:
Brice Leroy
Date:
2014-08-18 @ 16:39
I would also recommend you to try Linux instead of Windows. While it is 
possible to use windows for your flask/web server setup, long term you'll 
find much more libraries available to you on the Linux Ecosystem. 

Personally I have yet to find anybody running production flask on windows 
(maybe those who do could argue why through a reply on this email...). 

Ubuntu is a very good distribution of Linux, can be downloaded for free 
and installed on a USB memory stick. 

--
Brice Leroy

> On Aug 17, 2014, at 10:38 PM, "王国真" <keroroxx520@gmail.com> wrote:
> 
> better use virtualenv2.
> 
>> On Aug 18, 2014 9:34 AM, "luofeiyu" <elearn2014@gmail.com> wrote:
>> I am a newbie to flask,now i am reading the tutorial 
>> 
>> http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world
>> 
>> Installing Flask
>> 
>> Okay, let's get started!
>> 
>> If you haven't yet, go ahead and install Python 2.7.
>> 
>> Now we have to install Flask and several extensions that we will be 
using. My preferred way to do this is to create a virtual environment 
where everything gets installed, so that your main Python installation is 
not affected. As an added benefit, you won't need root access to do the 
installation in this way.
>> 
>> So, open up a terminal window, choose a location where you want your 
application to live and create a new folder there to contain it. Let's 
call the application folder microblog.
>> 
>> Next, download virtualenv.py and put it inside the new folder.
>> 
>> To create the virtual environment enter the following command:
>> 
>> python virtualenv.py flask
>> The above command creates a complete Python environment inside the 
flask folder.  You now have a flask sub-folder inside your microblog 
folder.
>> 
>> I can't do as the web say.
>> 
>> 1.  my system is win7 amd 64 +python3.4 (d:\Python34).
>> 
>> 2. I have installed flask from  
http://www.lfd.uci.edu/~gohlke/pythonlibs/  (amd64 python34 version)
>> My flask is in  D:\Python34\Lib\site-packages\flask-0.10.1-py3.4.egg\flask 
>> 3. I have installed virtualenv from  
http://www.lfd.uci.edu/~gohlke/pythonlibs/  (amd64 python34 version)
>> My virtualenv is in  
D:\Python34\Lib\site-packages\virtualenv-1.11.6-py3.4.egg-info
>> 4. I have build g:\microblog  .
>> 
>> how can i  install  flask in the g:\microblog\flask? can i copy 
D:\Python34\Lib\site-packages\flask-0.10.1-py3.4.egg\flask into 
g:\microblog\flask?