rsanchezgarc / deepEMhancer

Deep learning for cryo-EM maps post-processing
Apache License 2.0
47 stars 8 forks source link

AttributeError: module 'pandas' has no attribute 'Series' #33

Open papaig opened 1 month ago

papaig commented 1 month ago

Hi,

I just installed DeepEMhancer and when I try to run with the command: deepemhancer -i halfmapA.mrc -i2 halfmapB.mrc -o sharpened.map I got the bellow error. I would greatly appreciate your help. Gabor Error message: updating environment to select gpu: [1] loading model ~/.local/share/deepEMhancerModels/production_checkpoints/deepEMhancer_tightTarget.hd5 ... DONE! Automatic radial noise detected beyond 86.60254037844386 % of volume side DONE!. Shape at 1.00 A/voxel after padding-> (240, 240, 240) Neural net inference 0%| | 0/144 [00:00<?, ?it/s] Traceback (most recent call last): File "~/miniconda3/envs/deepEMhancer_env/bin/deepemhancer", line 8, in sys.exit(commanLineFun()) File "~/miniconda3/envs/deepEMhancer_env/lib/python3.9/site-packages/deepEMhancer/exeDeepEMhancer.py", line 80, in commanLineFun main( * parseArgs() ) File "~/miniconda3/envs/deepEMhancer_env/lib/python3.9/site-packages/deepEMhancer/exeDeepEMhancer.py", line 72, in main predVol= predictor.predict(inputVolOrFname, outputMap, binary_mask=binaryMask, noise_stats=noiseStats, File "~/miniconda3/envs/deepEMhancer_env/lib/python3.9/site-packages/deepEMhancer/applyProcessVol/processVol.py", line 194, in predict batch_y_pred= self.model.predict_on_batch(np.expand_dims(batch_x, axis=-1)) File "~/miniconda3/envs/deepEMhancer_env/lib/python3.9/site-packages/keras/engine/training.py", line 2599, in predict_on_batch iterator = data_adapter.single_batch_iterator( File "~/miniconda3/envs/deepEMhancer_env/lib/python3.9/site-packages/keras/engine/data_adapter.py", line 1824, in single_batch_iterator x, y, sample_weight = _process_tensorlike((x, y, sample_weight)) File "~/miniconda3/envs/deepEMhancer_env/lib/python3.9/site-packages/keras/engine/data_adapter.py", line 1140, in _process_tensorlike inputs = tf.nest.map_structure(_convert_single_tensor, inputs) File "~/miniconda3/envs/deepEMhancer_env/lib/python3.9/site-packages/tensorflow/python/util/nest.py", line 917, in map_structure structure[0], [func(x) for x in entries], File "~/miniconda3/envs/deepEMhancer_env/lib/python3.9/site-packages/tensorflow/python/util/nest.py", line 917, in structure[0], [func(*x) for x in entries], File "~/miniconda3/envs/deepEMhancer_env/lib/python3.9/site-packages/keras/engine/data_adapter.py", line 1128, in _convert_single_tensor if _is_pandas_series(x): File "~/miniconda3/envs/deepEMhancer_env/lib/python3.9/site-packages/keras/engine/data_adapter.py", line 1875, in _is_pandas_series return isinstance(x, pd.Series) AttributeError: module 'pandas' has no attribute 'Series'

rsanchezgarc commented 1 month ago

Hi, Can you tell me how you installed deepEMhancer?

The error is complaining about your pandas package installation. If I remember correctly, pandas is not a dependency of DeepEMhancer, so it may be conflicting with some already installed versions. Can you check its version and where it is located?

conda activate deepEMhancer_env 
python -c "import pandas as pd; print(pd.__version__);print(pd.__file__)"

In my installation says

ModuleNotFoundError: No module named 'pandas'

Whereas, in yours, if I am correct, it should show some version and location. If so, you need to remove pandas from the PYTHONPATH. Packages installed in the global environment (with pip install -u) can often interfere with local environments. Feel free to let me know if you need any more help.

papaig commented 1 month ago

Hi,

Thank you! After a lot of struggle I found the pandas module (file attribute was empty) and removing it solved the problem. Now DeepEMhancer works.

Best regards, Gabor

Gabor Papai IGBMC Integrated Structural Biology 1, rue Laurent Fries, Bp 10142 67404 Illkirch, France Tel: +33-3-69485288

On 14 May 2024, at 15:07, rsanchezgarc @.***> wrote:

Hi, Can you tell me how you installed deepEMhancer?

The error is complaining about your pandas package installation. If I remember correctly, pandas is not a dependency of DeepEMhancer, so it may be conflicting with some already installed versions. Can you check its version and where it is located?

conda activate deepEMhancer_env python -c "import pandas as pd; print(pd.version);print(pd.file)"

In my installation says

ModuleNotFoundError: No module named 'pandas'

Whereas, in yours, if I am correct, it should show some version and location. If so, you need to remove pandas from the PYTHONPATH. Packages installed in the global environment (with pip install -u) can often interfere with local environments. Feel free to let me know if you need any more help.

— Reply to this email directly, view it on GitHubhttps://github.com/rsanchezgarc/deepEMhancer/issues/33#issuecomment-2110193707, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALE6RL3OENHG3WCF4Z2T7Z3ZCIECDAVCNFSM6AAAAABHV2GDWWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJQGE4TGNZQG4. You are receiving this because you authored the thread.Message ID: @.***>