[postgis-users] QGIS Plugin PostGIS Manager
Florian Beyerbach
Florian.Beyerbach at gmx.de
Sun Jan 22 04:45:02 PST 2012
hi,
in Mac OSX Lion there is nomore file/folder ~/.MacOSX/environment.plist
i also don´t know exactly in which file i had to add the environment variables.
in the users home directory i found the files:
.profile
.bash_profile
these files are empty
with the command "echo $PATH" i get the following environment variables:
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/sw/bin:/sw/sbin:/usr/X11R6/bin:/usr/local/pgsql/share/contrib/postgis-1.5/:/usr/local/pgsql/bin
i found these in the file:
/etc/paths
and under the folder
/etc/paths.d/
but these are really not for all applications. i hope i can find the real files where i can put in environment variables for the whole system. any idea?
here i found some tips:
http://stackoverflow.com/questions/7501678/set-environment-variables-on-mac-os-x-lion
i followed your tipp and starteted qgis from the terminal and everything went fine with the postgis manager.
the following code in the QGis Python Console don´t solve the problem:
> import os
> path = os.getenv("PATH")
> pgpath = "/usr/local/pgsql/share/contrib/postgis-1.5/:/usr/local/pgsql-9.1/bin:/usr/local/pgsql-9.1/bin"
> path = pgpath if path == None or path == "" else path + os.pathsep + pgpath
> os.putenv("PATH", path)
regards
Florian
Am 22.01.2012 um 00:03 schrieb Giuseppe Sucameli:
> Hi,
>
> On Fri, Jan 20, 2012 at 9:51 PM, Florian Beyerbach
> <Florian.Beyerbach at gmx.de> wrote:
>> i use the tool terminal and the path environment variables are:
>>
>> mbp-wlan:~ fbeyerbach$ echo $PATH
>> /sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/X11R6/bin:/usr/local/pgsql/share/contrib/postgis-1.5/:/usr/local/pgsql-9.1/bin:/usr/local/pgsql-9.1/bin
>
> I've no MacOS, but few months ago I understood how it works.
> Each application defines what environment variables it needs, but
> the user can change them editing ~/.MacOSX/environment.plist
>
> What you wrote is the value of PATH defined for terminal,
> not the one for all the applications you run.
>
> A way to have the same terminal's environment in an application
> is to run the application from terminal.
> Could you try again running Qgis from terminal?
>
> Another solution could be to add environment variables before
> PostGis Manager launches shp2pgsql, just setting PATH using
> the QGis Python Console (menu Plugins):
>
> import os
> path = os.getenv("PATH")
> pgpath = "/usr/local/pgsql/share/contrib/postgis-1.5/:/usr/local/pgsql-9.1/bin:/usr/local/pgsql-9.1/bin"
> path = pgpath if path == None or path == "" else path + os.pathsep + pgpath
> os.putenv("PATH", path)
>
> In addition, there's a opened ticket [1] to add a panel to set/override
> environment variables withing QGis to help OSX users.
>
> I hope this helps.
> Regards.
>
> [1] http://hub.qgis.org/issues/3097
>
>> i think this should work. any idea?
>>
>>
>> Am 20.01.2012 um 20:18 schrieb Giuseppe Sucameli:
>>
>>> Hi Florian,
>>>
>>> On Fri, Jan 20, 2012 at 7:54 PM, Sandro Santilli <strk at keybit.net> wrote:
>>>> On Fri, Jan 20, 2012 at 07:14:07PM +0100, Florian Beyerbach wrote:
>>>>
>>>>> it is the first time i use this community support. if i make any mistake i´m sorry.
>>>
>>> I think this message should be sent to the qgis-user mailing list
>>> as the plugin is a QGis plugin.
>>>
>>>>> i try to use the PostGIS Manager Plugin 0.5.15 for QGIS 1.7.3 with the postgresql 9.1 and postgis 1.5.3 database on my MacBookPro with Mac OSX Lion 10.7.2.
>>>>> know i want to "Load Data from Shapefile", i chose the shape file in the dialog and after i click the load button
>>>>> i get the error message: "Message: Filename: None".
>>>
>>> PostGis Manager assumes that shp2pgsql executable is in PATH
>>> environment variable. It's unable to find it, so it throws an OSError
>>> exception.
>>>
>>> I'm sure that after adding shp2pgsql to the PATH env var it should
>>> work fine, but I've no Mac so I cannot say how to do this...
>>>
>>> I hope this helps.
>>> Regards.
>>>
>>>>> I have no idea what the problem is, can anybody help me?
>>>>
>>>> I think the db_manager plugin superceeds the PostGIS Manager one.
>>>>
>>>> Giuseppe (in Cc) is the author of db_manager, but can probably also
>>>> help with the PostGIS Manager plugin.
>>>>
>>>> --strk;
>>>>
>>>> () Free GIS & Flash consultant/developer
>>>> /\ http://strk.keybit.net/services.html
>>>
>>>
>>>
>>> --
>>> Giuseppe Sucameli
>>
>
>
>
> --
> Giuseppe Sucameli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120122/c7b733f5/attachment.html>
More information about the postgis-users
mailing list