1

When trying to import ray (code: import ray) into a Python script in macOSX Monterey and pycharm I get the following error:

ImportError: dlopen(/Users//PycharmProjects//venv/lib/python3.8/site-packages/ray/thirdparty_files/setproctitle.cpython-38-darwin.so, 0x0002): symbol not found in flat namespace '_Py_GetArgcArgv'

I have rebuilt the project and installed everything through pip in the venv to try a different route but get the same problem.

I have looked around and found similar import problems with setproctitle but none of the solutions seemed to work for me. I assume that setproctitle is a requirement of ray, and thats where the problems are, but I'm not sure.

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
Ally
  • 21
  • 3
  • Does https://stackoverflow.com/questions/35989572/importerror-dlopen-symbol-not-found-pycodecinfo-getincrementaldecoder help? – Karl Knechtel Jan 25 '22 at 21:19
  • Thanks for the pointer, I hadn't found that. I upgraded from py3.8 -> 3.9 and that fixed the issue. – Ally Jan 25 '22 at 21:33
  • It *might* be possible to make this into an appropriate question for the site at this point, but we don't really do tech support kinds of things. Glad you got it worked out, though. – Karl Knechtel Jan 25 '22 at 21:39

1 Answers1

1

I fixed the issue by upgrading from Python 3.8 to 3.9!

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
Ally
  • 21
  • 3