[Gmsh] gmsh-sdk installation question

Kenneth Assogba kennethassogba at gmail.com
Thu May 14 14:21:34 CEST 2020


Good morning,

I had the same problem a few weeks ago. You can try to: install gmsh
in a virtual
env <https://docs.python.org/3/library/venv.html> or put it manually in
python path :

- Enter in the home directory :
cd ~

- [Download the SDK](http://gmsh.info/bin/) depending on your system
wget http://gmsh.info/bin/Linux/gmsh-4.5.6-Linux64-sdk.tgz -O
/tmp/gmsh-sdk.tar.gz

- Uncompress it
tar -xvf /tmp/gmsh-sdk.tar.gz

- Open the *~/.bashrc* file and add to the last line
export *PYTHONPATH="${PYTHONPATH}":~/gmsh-4.5.6-Linux64-sdk/lib/

- source the *.bashrc* file
source ~/.bashrc

- test if all is ok
python3 gmsh-4.5.6-Linux64-sdk/share/doc/gmsh/demos/api/t1.py


Best regards,
Kenneth,


On Thu, May 14, 2020 at 1:22 PM Peter Johnston <p.johnston at griffith.edu.au>
wrote:

> Hello,
>
> I have a question about gmsh/gmsh-sdk installation under python - I
> realise this is not a gmsh question exactly, so hope it is OK.
>
> I was trying to install gmsh and gmsh-sdk on a computer running ubuntu
> 18.04 using 'pip3 install gmsh' (I also tried 'pip3 install gmsh-sdk'). On
> my mac laptop (OSX 10.15.4) this works fine. It puts the appropriate python
> gmsh files under /usr/local/ and everything works fine. However under
> ubuntu it installed to files under $HOME/.local/ and python3 says it cannot
> find the gmsh module.  I have modified the PYTHONPATH variable to take into
> account $HOME/.local/, but this doesn't help.
>
> I really don't know what is going on on two fronts:
>
>    1. I don't know why pip is installing things in different places
>    between my two machines.
>    2. When I type print(sys.path) in python it points to the places where
>    I think gmsh should be. Which files am I looking for exactly?
>
> After a long time trawling the internet, I couldn't find anything that
> would help me with these issues.
>
> Any insights would be much appreciated.
>
> Thank you,
>
> Peter.
>
> Associate Professor Peter Johnston (FAustMS, FIMA)
> School of Environment and Science
> *Griffith University *| Nathan | QLD 4111 | Technology (N44) Room 3.19
> T +61 7 373 57748| F +61 7 373 57656 Email p.johnston at griffith.edu.au
> <c.l.brown at griffith.edu.au>
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20200514/d3792576/attachment.html>


More information about the gmsh mailing list