-
Notifications
You must be signed in to change notification settings - Fork 30
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
ModuleNotFoundError: No module named 'sas' #467
Comments
Check out the section titled "Fitting Example" in the sasmodels README. [PAK: updated link]
So you need to also download the sasview repo, and add sasview/src to PYTHONPATH. They describe how to do this in the link above. Alternatively you can use sys.path.append('~/sasview/src') Good luck. |
Thanks @KLDwaSiedem -- I trust this solves your problem @Synthos? If so we can close this ticket. |
This process can be simplified by putting sasmodels on pypi (see #273) |
I assume you mean |
I use PyCharm. I have it set up so that src and src/sas are marked as "source directories". If you have the add source directories to python path box checked in the run configuration (spanner icon, or project properties), it should be able to find things. |
Why do you need It seems like it would cause confusion since it would allow, for example, importing of both sascalc and sas.sascalc. |
I do it mostly so the pycharm dev tools can pick up locations of files correctly, and the default run configuration works. Might be more than is necessary, but seems fine. |
I tweaked the error message so that we can close this ticket. We will need to tweak it again once nxsunit and the data loaders are available as a separate package. |
Hi everyone
I am trying to use the sasmodels library as a stand alone package in PyCharm.
So far, I tried different approaches, like simply installing sasmodels over the IDE. However, when I try to e.g. load some data with:
from sasmodels import data foo = data.load_data('file_name')
I receive the following error: ModuleNotFoundError: No module named 'sas'
I then deleted the project again and followed the description on https://pypi.org/project/sasmodels/
For that, I created a new folder and installed all the conda dependencies as described in the above tutorial. I can run the files such as sasmodels.jitter from the console. But as soon as I open the project in PyCharm it does not work anymore.
I did not find the module 'sas' and installing the sasview model also did not help. Did I understand something fundamentally wrong with regards to what is meant with "stand alone package"?
Did someone experience similar issues? My workstation has the following specs:
MB Pro 13-inch 2020
macOS Big Sur Version 11.4
I appreciate your help. Thanks in advance! :)
The text was updated successfully, but these errors were encountered: