simphony / simphony-openfoam

The implementation of the SimPhoNy OpenFOAM -wrappers.
GNU General Public License v2.0
2 stars 0 forks source link

Failing installation procedure on Ubuntu #56

Closed TobiasRasp closed 8 years ago

TobiasRasp commented 8 years ago

On Ubuntu the installation procedure fails when applying the command "python setup.py install" in the folder "/simphony-openfoam/openfoam-interface/internal-interface/wrapper", which is part of install_foam_interface.sh.

simphony@simphony-ubuntu12:~/simphony-openfoam/openfoam-interface/internal-interface/wrapper$ ls
build                     fvSchemes          lnInclude  pimpleFoam.H  simphonyInterface.C    simphonyInterface.H        solution
createFieldsPimpleFoam.H  libpythonfoam.cpp  Make       setup.py      simphonyInterface.dep  singlePhaseTransportModel  transportModel
simphony@simphony-ubuntu12:~/simphony-openfoam/openfoam-interface/internal-interface/wrapper$ python setup.py install
running install
running build
running build_ext
running install_lib
running install_egg_info
Writing /usr/local/lib/python2.7/dist-packages/FoamInterface-0.0.1.egg-info
error: /usr/local/lib/python2.7/dist-packages/FoamInterface-0.0.1.egg-info: Permission denied
simphony@simphony-ubuntu12:~/simphony-openfoam/openfoam-interface/internal-interface/wrapper$ 

Using sudo results in the following:

simphony@simphony-ubuntu12:~/simphony-openfoam/openfoam-interface/internal-interface/wrapper$ sudo python setup.py install
Traceback (most recent call last):
  File "setup.py", line 4, in <module>
    openfoam_src_dir = os.environ['FOAM_SRC']
  File "/usr/lib/python2.7/UserDict.py", line 23, in __getitem__
    raise KeyError(key)
KeyError: 'FOAM_SRC'

So, virtualenv was required for a proper installation.

kitchoi commented 8 years ago

I believe the problem would be resolved if one does this before setup.py

$ source /opt/openfoam222/etc/bashrc

(or openfoam230 instead of openfoam222 depending on the version of simphony-openfoam you are installing)