Skip to content
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

can not run test with python3.7 on mac #48

Open
binbinjiang1990 opened this issue Mar 30, 2023 · 10 comments
Open

can not run test with python3.7 on mac #48

binbinjiang1990 opened this issue Mar 30, 2023 · 10 comments

Comments

@binbinjiang1990
Copy link

import pyOSOAA
pyOSOAA.test()
Traceback (most recent call last):
File "", line 1, in
File "/Users/bjiang/Documents/pyOSOAA/pyOSOAA/osoaa.py", line 1386, in test
s = OSOAA()
File "/Users/bjiang/Documents/pyOSOAA/pyOSOAA/osoaa.py", line 1020, in init
self.dirmie = DIRMIE(osoaaroot=self.root)
File "/Users/bjiang/Documents/pyOSOAA/pyOSOAA/osoaa.py", line 198, in init
self.hyd = os.path.join(osoaaroot, hid)
File "/Users/bjiang/opt/anaconda3/envs/osoaa/lib/python3.7/posixpath.py", line 80, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType

@binbinjiang1990 binbinjiang1990 changed the title can not run test can not run test with python3.7 on mac Mar 30, 2023
@ghost
Copy link

ghost commented Mar 30, 2023

check your environment variable OSOAAROOT if exists

@binbinjiang1990
Copy link
Author

binbinjiang1990 commented Mar 30, 2023 via email

@ghost
Copy link

ghost commented Mar 30, 2023

OSOAA_ROOT=/Users/bjiang/Documents/OSOAA not pyOSOAA

@binbinjiang1990
Copy link
Author

Dear Fengqiao,

Thank you for your reply.

is that means i should follow "OSOAA installation" step first in "pyOSOAA Documentation". But my system is mac, not ubuntu 18. is that works for me?

Best

Binbin

@fnemina
Copy link
Owner

fnemina commented Mar 30, 2023

Dear Binbinjian

As Fengqiao described you need to first follow the OSOAA install procedure before moving to using pyOSOAA.

A few pointers for installing it on mac:

  1. You can get the gfortran compiler from brew or from conda. If you use brew, a package manager similar to apt or dnf but for OSX, you can find the instruccions here: https://formulae.brew.sh/formula/gcc#default

  2. You need to set your export, the OSOAA_ROOT variable, in the config file of your shell. It should be .bashrc or .zshrc

After doing this two things the test should work, but feel free to ask me anytime.

Best
Fran

@binbinjiang1990
Copy link
Author

binbinjiang1990 commented Mar 31, 2023 via email

@fnemina
Copy link
Owner

fnemina commented Apr 5, 2023

Hello, two questions:

  1. Did you add the OSOAA_ROOT variable to .bashrc or the .zshrc?
  2. Can you please give me the output of the echo $OSOAA_ROOT command.

@binbinjiang1990
Copy link
Author

binbinjiang1990 commented Apr 6, 2023 via email

@fnemina
Copy link
Owner

fnemina commented Apr 19, 2023

Hello BinBin,

it seems that the image didn't to get to me. This is how the output should look like

Screenshot 2023-04-19 at 09 22 41

For what you have been telling me, I guess what is happening is you are using a different shell to the one where configured the OSOAA_ROOT variable. You can check your current shell using the command ps $$

Screenshot 2023-04-19 at 09 24 14

Best

@binbinjiang1990
Copy link
Author

binbinjiang1990 commented Jun 6, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants