BodenmillerGroup / ImcSegmentationPipeline

A pixel classification based multiplexed image segmentation pipeline
https://bodenmillergroup.github.io/ImcSegmentationPipeline/
MIT License
82 stars 35 forks source link

'{sys.executable}' is not recognized; imcsegpipe not found #95

Closed Jeffchingg closed 2 years ago

Jeffchingg commented 2 years ago

Hi,

I am new in this field so the question below may be a bit naïve. I am trying to run your IMC segmentation pipeline in Jupyter notebook. it runs into errors at the first two steps. Can you help me to figure out what happened? Error messages are below.

Thanks

# import sys
# from pathlib import Path
!{sys.executable} -m pip install -e {Path.cwd().parent}

Error message:

'{sys.executable}' is not recognized as an internal or external command, operable program or batch file.

import shutil
from pathlib import Path
from tempfile import TemporaryDirectory
from typing import List
import pandas as pd
import imcsegpipe
from imcsegpipe.utils import sort_channels_by_mass

Error messages:

ModuleNotFoundError Traceback (most recent call last) Input In [17], in <cell line: 8>() 4 from typing import List 6 import pandas as pd ----> 8 import imcsegpipe 9 from imcsegpipe.utils import sort_channels_by_mass ModuleNotFoundError: No module named 'imcsegpipe'

jwindhager commented 2 years ago

Hi @Jeffchingg, are you running Jupyter notebook/Jupyter lab from within the imcsegpipe environment, as described here?

@nilseling, since I just noticed it: probably good to either a) comment out or b) uncomment both the Python import statements and the pip install command (currently, the Python import statements are commented out, but the pip install command is uncommented).

Jeffchingg commented 2 years ago

Hi @jwindhager , Yes I first download your ImcSegmentationPipeline respirtory and import to Anaconda environment. Please see screenshot below: image

nilseling commented 2 years ago

Hmm, it seems like the you are still using the old ImcSegmentationPipeline environment. Could you please check if you can see imctools within this environment? If so, you will need to create a new imcsegpipe environment which contains the software used for the new version of the pipeline.

Jeffchingg commented 2 years ago

Hi @nilseling, I did download all things here and created imcsegpipe with 'environmental.yml'.

There was an error when creating environment. it shows 'CondaEnvException: Pip failed'. will this affect? if so, how to solve this? Thanks

jwindhager commented 2 years ago

@nilseling I suspect the graphical installer may not change the workdir to the repository and therefore the editable local install (see environment.yml) fails

nilseling commented 2 years ago

Ok, thanks! I'll have a look into this tomorrow

Jeffchingg commented 2 years ago

@jwindhager @nilseling Thank you for the notes. I remove the environment and installed with cmd. it worked without error messages. Also when running, all packages were found.

but when running the pipeline, the 1st issue is still there. '{sys.executable}' is not recognized as an internal or external command, operable program or batch file.

can any suggestions? Thanks a lot

nilseling commented 2 years ago

Sorry for that, this line needs to be commented out. Please see the current version of the script