beam-tracing / Scotty

Beam tracing code for diagnostics
https://scotty.readthedocs.io/en/latest/
GNU General Public License v3.0
7 stars 4 forks source link

Cannot pip install scotty on ``freia`` #73

Closed quinntpratt closed 1 year ago

quinntpratt commented 1 year ago

Hi all, I made a local clone of scotty on freia via, git clone git@github.com:valerian-chen/Scotty.git SCOTTY then I went into the SCOTTY folder and did, pip install . and I received the following error,

Directory '.' is not installable. File 'setup.py' not found.
/usr/local/depot/Python-2.7.5/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning

Upon further inspection it does appear that there's no setup.py file in the scotty repo. Thanks.

quinntpratt commented 1 year ago

To follow up on this, If I ignore installing with pip for now and I move the script: SCOTTY/Examples/Scotty_main_OMFIT.py to the SCOTTY directory and try to run it via OMFIT I get a ModuleNotFoundError on the line, import freegs._fileutils as fortran. Upon further inspection it seems that the module freegs is not part of the OMFIT environment... would pip have recognized this dependency and installed it? or is this a separate issue?

Thanks.

ZedThree commented 1 year ago

Ah, your pip is pointing to a version using python 2.7, which is no longer supported. Try using python3 -m pip install . instead.

Yes, pip should install all the required dependencies for you

quinntpratt commented 1 year ago

Yep, that fixed it. I had to invoke the usual freia omfit recipe of loading/unloading modules to get the proper python3 path. After that pip worked and it installed the freegs module.