Recommended way to install and test latest pyme with Python 3

A brief question for the core pyme developers:

What is the currently recommended installation procedure (in a clean virtualenv) if I want to test the state of the Python 3 port of pyme. Should I use pip, conda, other? Do current docs describe the latest way how to do this? Are there platform dependent considerations?

Many thanks,
Christian

Hi Christian,

Thanks for testing PYME on python 3.

conda create -n <new-env-name> -c barentine python=3.6 python-microscopy

will give you a Python 3 package built yesterday on linux, mac, or windows.

That said, as those packages go out of date I would recommend the pip development install below so you can easily test the most up-to-date PYME. The py3 packages in my channel are to make installs easy for nep-fitting users while we make the py2->3 transition for the default PYME install (we encountered some py2 PYME/nep-fitting version conflicts recently).

Thanks!
Andrew

pip development install

pip development install

conda create -n <name> python=3.6 numpy=1.16 cython
conda activate <name>
git clone git@github.com:python-microscopy/python-microscopy.git
cd python-microscopy
pip install -r requirements.txt
python setup.py develop

If you do that before these two pull requests are merged (a, b) you will also want to

pip install sphinx    
pip install mpld3

and if you want bioformats compatibility, install Java Development Kit 1.8 and then

pip install javabridge
pip install python-bioformats
less recommended: conda development install

conda development install

conda create -n <name>  -c barentine python=3.6 pyme-depends
conda activate <name>
git clone git@github.com:python-microscopy/python-microscopy.git
cd python-microscopy
python setup.py develop

should work, as the only PYME packages in my channel are py3.6. That said, pip installing the requirements is probably preferable in that you can change versions of individual packages if we find any fresh issues.

Excellent, thanks Andrew, exactly the info I was after!
Cheers,
Christian

No problem! We’ll try and have that information in the documentation soon.

Note that I just updated the pip install instructions thanks to a comment from @zacsimile - having numpy and cython installed before pip installing the dependencies is probably safest at the moment.

I’ll add that (as might be obvious) packaging on python3 in a state of flux.

Andrew’s been test building conda packages for Py3.6 (see first option), which are current at this point in time, but manually building packages is a pain and package building is something we hope to automate in the near future. The automated builds will probably end up in a new conda channel.

For now, I’d say that the official py3 install route is to build from source:

git clone https:\\github.com\python-microscopy\python-microsocopy.git
conda create -n <your_env_name> python=3.6 pyme-depends
python setup.py develop

The pip route is still very new, and is best regarded as a fallback if conda can’t resolve the environment or if you want to install into an environment which already has other packages that might conflict. The pip route puts the onus on you for getting all the dependencies installed (the requirements.txt is deliberately incomplete to avoid the most common package conflicts whilst still giving a mostly functional install).

PS - you’ll need to substitute PYMEClusterOfOne for launchWorkers. It should be more or less a 1:1 replacement from an end user perspective, but is quite different under the hood. Live updates during localisation should now work again, but are very ‘alpha’ (might still break)

1 Like