sas is the main package of sasview. I think that line should not be there.
In latest version of sasmodels/data.py it isn't there:
import numpy as np # type: ignore
from numpy import sqrt, sin, cos, pi
# pylint: disable=unused-import
try:
from typing import Union, Dict, List, Optional, Tuple, Callable
Data = Union["Data1D", "Data2D", "SesansData"]
Try cloning the latest sasmodels (and sasdata)?
Hello everyone,
I am trying to run the
scripting tutorial, and I am unable to run the code because I can't import the 'sas' package.
When I run the import statements at the top of the tutorial, i.e.
import sys
from bumps.names import *
from sasmodels.core import load_model
from sasmodels.bumps_model import Model, Experiment
from sasmodels.data import load_data, set_beam_stop, set_top
I get
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Cell In[9], line 4
2 from bumps.names import *
3 from sasmodels.core import load_model
----> 4 from sasmodels.bumps_model import Model, Experiment
5 from sasmodels.data import load_data, set_beam_stop, set_top
File ~/micromamba/envs/smi_py311/lib/python3.11/site-packages/sasmodels/bumps_model.py:20
16 __all__ = ["Model", "Experiment", "BumpsParameter"]
18 import numpy as np # type: ignore
---> 20 from .data import plot_theory
21 from .direct_model import DataMixin
23 # pylint: disable=unused-import
File ~/micromamba/envs/smi_py311/lib/python3.11/site-packages/sasmodels/data.py:39
37 import numpy as np # type: ignore
38 from numpy import sqrt, sin, cos, pi
---> 39 import sas
40 # pylint: disable=unused-import
41 try:
ModuleNotFoundError: No module named 'sas'
I apparently have sasmodels installed, since I can successfully import
load_model from sasmodels.core. However, it seems I am missing the
sas package. I have searched online and wasn't able to find any such package. I ran a simple
pip install sas, and indeed, something downloaded, but it didn't resolve the issue.
Any insights on the issue would be most appreciated.
Best,
Ian Billinge
--
Ian Billinge
he/him/his
Ph.D Student, Yip Lab
Dept. of Earth & Environmental Engineering
Fu Foundation School of Engineering
Columbia University in the City of New York