Skip to content

Instantly share code, notes, and snippets.

@ChristopherHogan
Last active November 19, 2021 03:44
Show Gist options
  • Save ChristopherHogan/c22bb7cc7248f7595c4b09d0e3b16735 to your computer and use it in GitHub Desktop.
Save ChristopherHogan/c22bb7cc7248f7595c4b09d0e3b16735 to your computer and use it in GitHub Desktop.
PyMeep Conda Package Installation

PyMeep Conda Package Installation

PyMeep conda packages are currently only available for python 2.7 and 3.6 on Linux (tested on Debian Jessie and Ubuntu Xenial). Note that PyMeep is still in its development stages, and should be considered alpha software. The conda packages are subject to change at any time.

1. Install Miniconda

It doesn't really matter if you install the python 2.7 or 3.6 version, since you can create conda environments with any version you want.

wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b -p <desired_prefix>/miniconda3
export PATH=<desired_prefix>/miniconda3/bin:$PATH

2. Create a PyMeep Conda Environment (named "pm")

conda create -n pm -c chogan pymeep

This will default to the python version of your Miniconda installation. If you want a different python version than your Miniconda installation, you can force the python version like this:

conda create -n pm2 -c chogan python=2 pymeep

3. Activate the Environment

source activate pm

Now when you type python, it will use the PyMeep environment (located at <desired_prefix>/miniconda3/envs/pm.

python -c 'import meep'

Troubleshooting

If you experience issues, make sure your PYTHONPATH environment variable is unset, and make sure LD_LIBRARY_PATH doesn't point to any meep libraries.

@rounaksingh
Copy link

rounaksingh commented Dec 18, 2017

conda package is available for 64-bit machines

@khonguyen
Copy link

I got this error after "import meep"
ImportError: libctlgeom.so.5: cannot open shared object file: No such file or directory
Do you have any insight?
Thanks much!

@guduan
Copy link

guduan commented Dec 28, 2017

Same problem as khonguyen's (ImportError: libctlgeom.so.5).
Any adivce? Thanks.

@shibazhang-dou
Copy link

After 'activate pm', we need to install PyMeep
https://github.com/conda-forge/pymeep-feedstock

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment