Changeset 4446
- Timestamp:
- May 26, 2020 8:45:49 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
install/g2complete/src/bootstrap.py
r4445 r4446 18 18 binaryVersion=None # if specified, gives a specific numpy version to use (such as 1.18) 19 19 # for selecting a set of binaries to use 20 numpyVersion=None 20 21 21 22 for a in sys.argv[1:]: … … 85 86 dlg.Destroy() 86 87 else: 87 print("BOOTSTRAP WARNING: ",file=sys.stderr) 88 for line in msg.split('\n'): 89 print(line,file=sys.stderr) 90 print("Recreate this using command:") 88 print("Recreate error this using command:") 91 89 print(" {} {} {}".format( 92 90 os.path.abspath(sys.executable), … … 94 92 ' '.join(sys.argv[1:]), 95 93 ),file=sys.stderr) 94 print("\nBOOTSTRAP WARNING: ",file=sys.stderr) 95 for line in msg.split('\n'): 96 print(line,file=sys.stderr) 96 97 sys.exit() 97 98 … … 470 471 msg += err 471 472 if os.path.exists(os.path.join(path2GSAS2,"makeBat.py")): 472 msg += '\n \nGSAS-II failed to be updated. A likely reason is a network access'473 msg += '\n problem. If your web browser works, but the update did not.'474 msg += '\n The most common reason is you need to use a network proxy. Please'473 msg += '\nGSAS-II appears to be installed but failed to be updated. A likely reason' 474 msg += '\nis a network access problem. If your web browser works, but this update did' 475 msg += '\nnot, the most common reason is you need to use a network proxy. Please' 475 476 msg += '\ncheck with a network administrator or use http://www.whatismyproxy.com/' 477 msg += '\n\nIf installing from the gsas2full dist and your computer is not connected' 478 msg += '\nto the internet, this error message can be ignored.\n' 476 479 else: 477 480 # this will happen only with initial installs where all files … … 510 513 # test if the compiled files load correctly 511 514 #=========================================================================== 515 GSASIItested = False 512 516 if not skipInstallChecks: 513 script = """ # commands that test each module can at least be loaded & run something in pyspg 514 try: 515 import GSASIIpath 516 GSASIIpath.SetBinaryPath(loadBinary=False) 517 import pyspg 518 import histogram2d 519 import polymask 520 import pypowder 521 import pytexture 522 pyspg.sgforpy('P -1') 523 print('==OK==') 524 except Exception as err: 525 print(err) 526 """ 517 script = """ 518 # commands that test each module can at least be loaded & run something in pyspg 519 try: 520 import GSASIIpath 521 GSASIIpath.SetBinaryPath(loadBinary=False) 522 import pyspg 523 import histogram2d 524 import polymask 525 import pypowder 526 import pytexture 527 pyspg.sgforpy('P -1') 528 print('==OK==') 529 except Exception as err: 530 print(err) 531 """ 527 532 p = subprocess.Popen([sys.executable,'-c',script],stdout=subprocess.PIPE,stderr=subprocess.PIPE, 528 533 cwd=path2GSAS2) … … 551 556 else: 552 557 print('Successfully tested compiled routines') 558 GSASIItested = True 553 559 #=========================================================================== 554 560 # import all .py files so that .pyc files get created
Note: See TracChangeset
for help on using the changeset viewer.