[GRASS-dev] Handling of Python scripts on MS Windows
Pietro
peter.zamb at gmail.com
Wed Jan 29 01:29:36 PST 2014
Hi Markus,
On Tue, Jan 28, 2014 at 7:25 PM, Markus Metz
<markus.metz.giswork at gmail.com> wrote:
>> In this way all the Mac/Linux/windows users should be able to install
>> GRASS and all its dependencies with:
>>
>> $ easy_install grass
>>
>> or using pip
>>
>> $ pip install grass
>>
>
> I am afraid this does not work if there is no system-wide python
> installation.
yes, this possible solution could work only if you have installed
setuptools and easy_install or pip on your interpreter. The python
interpreter must be already installed somehow.
> Moreover, how would easy_install and pip know that they
> should use GRASS_PYTHON? I mean,
> $ pip install grass
> could then only work if GRASS with GRASS_PYTHON is already installed?
Of course neither easy_install or pip know nothing about GRASS and
GRASS_PYTHON, they need only an interpreter to download all the
dependencies, compile, and install GRASS on your system.
Then if you want to run your GRASS program you have to use the right
interpreter, nothing more, nothing less.
Probably could be just an easier way to allow user to choose, and be
conscious of which python interpreter (or virtual environment) will be
used by GRASS.
Anyway, I don't think that setuptools could be the solution for our
problems, at least not in the short term. And I agree with you,
creating .bat files, it seems the best/easier solution so far.
Pietro
ps: Small note: python 3.3 insert the native support for virtual
environment in the standard library
(http://docs.python.org/3/library/venv.html).
More information about the grass-dev
mailing list