-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
problem with "RuntimeError: Numpy is not available" #4
Comments
Issue: RuntimeError: Numpy is not availableThank you for the kind words and for using DeepSNUPI! I appreciate you bringing up this issue, and I’d be happy to help. It seems the error occurs because the program is trying to convert a Please ensure Compatibility of DependenciesConflicts between
To ensure compatibility, you can update them to their latest versions: Thank you again and best wishes! |
Thanks a lot!!! I sincerely appreciate your support! This work is incredibly valuable and impactful—truly beneficial and inspiring!
Shuang Li, Ph.D Student
Peking University, China
发件人:"SNUPI (Structural NUcleic-acids Programming Interface)" ***@***.***>
发送日期:2024-12-05 11:22:49
收件人:SSDL-SNU/DeepSNUPI ***@***.***>
抄送人:Shuang Li ***@***.***>,Author ***@***.***>
主题:Re: [SSDL-SNU/DeepSNUPI] problem with "RuntimeError: Numpy is not available" (Issue #4)
Issue: RuntimeError: Numpy is not availableThank you for the kind words and for using DeepSNUPI! I appreciate you bringing up this issue, and I’d be happy to help. It seems the error occurs because the program is trying to convert a torch.Tensor to a numpy array in the draw_DnaOrigami function. Here are some steps to resolve the issue:
1. Verify Numpy InstallationAlthough you've confirmed numpy is installed, ensure it’s accessible in the DeepSNUPI environment. Run the following commands in your terminal:
conda activate DeepSNUPI
python -c "import numpy; print(numpy.__version__)"
## 2. Ensure Compatibility of Dependencies
Conflicts between torch, numpy, and plotly can sometimes cause issues. Update them to compatible versions:
```bash
pip install --upgrade numpy torch plotly
And here are the dependencies currently in my `conda` environment for reference:
- **pytorch**: `2.0.0`
- **numpy**: `1.26.4`
- **plotly**: `5.15.0`
```bash
Thank you again and best wishes!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Amazing work! But i couldn't figure out why i met the problem "RuntimeError: Numpy is not available" after using "streamlit run DeepSNUPI.py ". (i have checked that the package numpy is already installed in the enviroment DeepSNUPI). Could u plz help me with the problem? thanks a lot!!!
the complete error is shown below:
RuntimeError: Numpy is not available
File "C:\Users\ls\anaconda3\envs\DeepSNUPI\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 552, in _run_script exec(code, module.dict )
File "C:\Users\ls\Desktop\DeepSNUPI\DeepSNUPI.py", line 160, in fig_init = draw_DnaOrigami(dna, dna.x[:,0:6], SE_init, EE_init)
File "C:\Users\ls\Desktop\DeepSNUPI\src\visual.py", line 59, in draw_DnaOrigami trace_edges = go.Scatter3d( x=x_edges,
File "C:\Users\ls\anaconda3\envs\DeepSNUPI\lib\site-packages\plotly\graph_objs_scatter3d.py", line 2758, in init self["x"] = _v
File "C:\Users\ls\anaconda3\envs\DeepSNUPI\lib\site-packages\plotly\basedatatypes.py", line 4873, in setitem self._set_prop(prop, value)
File "C:\Users\ls\anaconda3\envs\DeepSNUPI\lib\site-packages\plotly\basedatatypes.py", line 5212, in _set_prop val = validator.validate_coerce(val)
File "C:\Users\ls\anaconda3\envs\DeepSNUPI\lib\site-packages_plotly_utils\basevalidators.py", line 401, in validate_coerce v = to_scalar_or_list(v)
File "C:\Users\ls\anaconda3\envs\DeepSNUPI\lib\site-packages_plotly_utils\basevalidators.py", line 41, in to_scalar_or_list return [to_scalar_or_list(e) for e in v]
File "C:\Users\ls\anaconda3\envs\DeepSNUPI\lib\site-packages_plotly_utils\basevalidators.py", line 41, in return [to_scalar_or_list(e) for e in v]
File "C:\Users\ls\anaconda3\envs\DeepSNUPI\lib\site-packages_plotly_utils\basevalidators.py", line 49, in to_scalar_or_list return to_scalar_or_list(np.array(v))
File "C:\Users\ls\anaconda3\envs\DeepSNUPI\lib\site-packages\torch_tensor.py", line 970, in array return self.numpy()
The text was updated successfully, but these errors were encountered: