SOLVED: numpy would not load: libgcc_s vs. libgfortran

Olivier Duchateau duchateau.olivier at gmail.com
Tue Jan 5 04:32:44 UTC 2016


2016-01-05 0:13 GMT+01:00 Mikhail T. <mi+thun at aldan.algebra.com>:
> On 04.01.2016 18:59, Olivier Duchateau wrote:
>
>> I wonder, if this has something to do with my setting PYTHONPATH -- I
>> need the not-yet-installed mediagoblin packages to be found in ${WRKSRC}
>> by the tests. What is the proper way of to do this?
>
> You can add module (and submodules) with sys module.
>
> For example in mediagoblin/tests/tools.py before line beginning by 'from
> mediagoblin ...'
>
> import sys
>
> # Full path of mediagoblin
> sys.append('/spare/usr/ports/www/py-mediagoblin/work/mediagoblin-0.8.1/mediagoblin')
>
> Ouch! I was hoping, I could set an environment variable and be done with it
> -- something like PATH or LD_LIBRARY_PATH or TCLPATH...

It's PYTHONPATH [1]. It depends of your shell

export PYTHONPATH=${PYTHONPATH}:/spare/usr/ports/www/py-mediagoblin/work/mediagoblin-0.8.1/mediagoblin

or

setenv PYTHONPATH
${PYTHONPATH}:/spare/usr/ports/www/py-mediagoblin/work/mediagoblin-0.8.1/mediagoblin

In my previous message, it should be

sys.modules.append('...') not sys.append('...')

[1] https://docs.python.org/2/using/cmdline.html#envvar-PYTHONPATH

>
> -mi



-- 
olivier


More information about the freebsd-python mailing list