# Python, access to library depends on what folder I am in?



## olav (Apr 25, 2011)

I have a weird issue with my Python installation.

I've installed Python 2.7 from ports and easy_install

I've installed a web library called Flaskwith easy_install

If I execute python when I stand in the / or /root folder I cannot import this library with the line
[CMD=""]from flask import Flask[/CMD]

However if I stand in another folder, like for example a users home folder or /usr/ports this works just fine. This happens only when I'm logged in as root. Why is this happening? Is it possible to fix it?


----------



## SirDice (Apr 26, 2011)

Use the port system to install it.

www/py-flask


----------



## olav (Apr 26, 2011)

Well that worked better, thanks 

I guess easy_install should never be used?


----------



## SirDice (Apr 26, 2011)

Use the port if it's available. If there's no port consider porting it yourself.


----------

