TuragaLab / DECODE

This is the official implementation of our publication "Deep learning enables fast and dense single-molecule localization with high accuracy" (Nature Methods)
GNU General Public License v3.0
95 stars 26 forks source link

Conda installs old decode version by default #137

Closed tsuijenk closed 3 years ago

tsuijenk commented 3 years ago

Hello, I am getting the following error.

Something I have been wondering is that I insalled DECODE=0.10.0.

But when I import decode, it says version 0.9.4. I wonder if this is the cause of this error? Please advise.

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/var/folders/1t/81dhm_v96qb8wc49ywzqsnv00000gn/T/ipykernel_43536/810204044.py in <module>
     26                                                           img_shape=size_procced[-2:]),
     27 
---> 28     decode.neuralfitter.post_processing.SpatialIntegration(raw_th=0.1,
     29                                                            xy_unit='px',
     30                                                            px_size=param.Camera.px_size)

AttributeError: module 'decode.neuralfitter.post_processing' has no attribute 'SpatialIntegration'
Haydnspass commented 3 years ago

Dear @tsuijenk, could you provide the conda command you used to install decode? :)

tsuijenk commented 3 years ago

Dear Lucas,

Thank you for your quick reply! I followed the tutorial and use the following:

conda config --set channel_priority strict

conda create -n decode_env -c turagalab -c pytorch -c conda-forge decode cudatoolkit jupyterlab ipykernel

conda info | grep -i 'base environment'

source /opt/conda/etc/profile.d/conda.sh

conda activate decode_env
tsuijenk commented 3 years ago

Dear Lucas,

I realized that following the instructions on your tutorial, it actually only installs 0.9.4., which is before the SpatialIntegration was added. Despite the system says "collecting decode=0.10.0".

I am trying to figure out how to upgrade to 0.10.0, since the system says no such version available.

(decode_env) user@john sample_data % conda install decode=0.10.0
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - decode=0.10.0
tsuijenk commented 3 years ago

Issue resolved. I did

conda install https://anaconda.org/Turagalab/decode/0.10.0/download/noarch/decode-0.10.0-np119py_0.tar.bz2

tsuijenk commented 3 years ago

Some follow-ups here:

Now that I have 0.10.0 actually installed, it says it is incompatible with Jupyter Lab 2. But Jupyter Lab 2 has the Google Drive extension which is really handy.

Now continuing with Jupyter Lab 3, I tried to conda install google-colab, but it also says there is package inconsistency.

Could you please provide some recommendations? :)

Haydnspass commented 3 years ago

Okay I need to investigate on this. I think there is some dependency that is gone missing and conda can probably only resolve by going back to the old decode version.

In general you should not use conda install with a concrete URL or local path because I think this will not install dependencies correctly.

I would need to investigate regarding the Google drive extension. However I don't think anything if decode requires a certain Jupiter lab version. So if you go ahead and install a new Jupiter lab version that new drive extension will probably work too?

Haydnspass commented 3 years ago

Pinned the decode version in the install instructions.

https://decode.readthedocs.io/en/release-0.10/installation.html#installation-in-terminal-macos-linux-anaconda-prompt-on-windows

Regarding jupyterlab please try the following command, for me it works

conda create -n decode_env -c turagalab -c pytorch -c conda-forge decode=0.10.0 cudatoolkit=11.0 jupyterlab=3 ipykernel

If that does not help, please reopen the issue.