Allen Cell Discussion Forum

Classic Image Segmentation installation

I am running into a bit of a snag when I try to install the Classic Image Segmentation Workflow.

During installation, when i try run:

pip install -e .[all]

in anaconda prompt I get the following error:

ERROR: Command errored out with exit status 1:
 command: 'C:\Users\LegantLab\.conda\envs\segmentation\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\LegantLab\\Desktop\\tad_temp_analysis\\allen_segm\\aics-segmentation\\setup.py'"'"'; __file__='"'"'C:\\Users\\LegantLab\\Desktop\\tad_temp_analysis\\allen_segm\\aics-segmentation\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info
     cwd: C:\Users\LegantLab\Desktop\tad_temp_analysis\allen_segm\aics-segmentation\
Complete output (9 lines):
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\LegantLab\Desktop\tad_temp_analysis\allen_segm\aics-segmentation\setup.py", line 45, in <module>
    long_description=readme(),
  File "C:\Users\LegantLab\Desktop\tad_temp_analysis\allen_segm\aics-segmentation\setup.py", line 20, in readme
    return f.read()
  File "C:\Users\LegantLab\.conda\envs\segmentation\lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 4737: character maps to <undefined>
----------------------------------------

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

I am not sure if this a problem that anyone else has encountered and am having trouble tracing the error.

Thanks in advance for any help that anyone can offer.

is the following post helpful?

in short, it is likely an issue with the directory you are working on

Hmm that is a nice thought but other than my boss’s insistance on camel case and my preference for snake case I can’t come up with anything wrong with the names of the directories.

can you try this?

pip install pandas

and see if there is any error?

UPDATE: I tried installing this on a different machine and am getting what appears to be the same error code.

same cp1252.py and same UnicodeDecodeError: ‘charmap’ codec can’t decode byte 0x9d in position 4737: character maps to

On both machines I cloned package into folder on desktop so leads me to think it is not a directory problem.

Pandas installation: Successfully installed pandas-1.0.1 pytz-2019.3

Thanks by the way for the help and suggestions. I’m grateful for it.

Pandas seemed to install with out a hitch in the anaconda environment on both machines.

UPDATE: I can reprduce the same error on my Windows machine. This is a new issue I have never seen on Windows. It may be related to some recent Windows updates. I will look into it and keep you posted.

Awesome! Thanks so much for the help!

Let me know if there is anything that I can do on my end to help along.

I find the issue. For some reason, Windows changed the default decoding standard at some point, so that our configuration file for installation cannot be decoded in the correct way. I have updated our configuration file accordingly to accomendate the specific setting in Windows.

Can you pull the update from github and run the installation again? Basically, inside the package directory, do git pull. Then, you will have the latest version.

Let me know if it does not work.
Thanks,
Jianxu

Looks like that did it!

Thanks for the help!