py4dstem / py4DSTEM

GNU General Public License v3.0
199 stars 135 forks source link

"Solving environment: failed with initial frozen solve. Retrying with flexible solve." During installation #649

Closed Cheng-Zhao-MCEM closed 4 months ago

Cheng-Zhao-MCEM commented 4 months ago

Might be a basic question but I am encountering this in both windows and linux (Ubuntu22.04.3LTS): During my installation according to https://py4dstem.readthedocs.io/en/latest/installation.html#recommended-installation, when I do conda install -c conda-forge py4dstem, I always seem to fail (both win and linux) by the following error message: Collecting package metadata (current_repodata.json): done Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve. Solving environment: unsuccessful attempt using repodata from current_repodata.json, retrying with next repodata source. Collecting package metadata (repodata.json): done Solving environment: \ Killed Just writing here to see if anyone knows a fix to this? My current conda version is 23.5.2 for Ubuntu and 22.9.0 for Windows.

Thanks in advance!

sezelt commented 4 months ago

What version of Python did you specify when creating the environment? The instructions you linked are out of date (they have been fixed in the development version but not on the website yet), and specifying 3.9 will likely not work anymore. Can you try instead specifying Python 3.12 when creating the environment?

Cheng-Zhao-MCEM commented 4 months ago

Hi Steve, Thanks, Python 3.12 works great. Just another probably basic question while I want to import an EMPAD .raw file with size (R256x16xQ128x128), but the default import_file will always put it in a 64*64 manner. Do you know how to fix this? More generally, I was scanning through the docs trying to find where are all the kwargs located?

Thanks again! Cheng

sezelt commented 4 months ago

Because of the way that the readers work, some of the keyword arguments are indeed hidden in the top-level docstrings. The function that reads EMPAD data is here: https://github.com/py4dstem/py4DSTEM/blob/6a6c6cc94ac4acf67e49ce38f8a296e66b7ac8ac/py4DSTEM/io/filereaders/empad.py#L15-L32 The arguent you need is EMPAD_shape=(256,16). You can also just reshape the data after it's loaded as well.

sezelt commented 4 months ago

By the way, you can pass that argument to the top level reader: datacube = py4DSTEM.import_file("/path/to/data.raw", EMPAD_shape=(256,16))