python-import

Import issue for setproctitle on Mac OS,

懵懂的女人 提交于 2020-12-06 02:57:22
问题 In python, If I try to import setproctitle I get the following import error: ImportError: dlopen(/Users/xxx/.local/share/virtualenvs/airflow_gg-F_Vv1Po_/lib/python3.7/site-packages/setproctitle.cpython-37m-darwin.so, 2): Symbol not found: _Py_GetArgcArgv Referenced from: /Users/xxx/.local/share/virtualenvs/airflow_gg-F_Vv1Po_/lib/python3.7/site-packages/setproctitle.cpython-37m-darwin.so Expected in: flat namespace in /Users/xxx/.local/share/virtualenvs/airflow_gg-F_Vv1Po_/lib/python3.7/site

Import py file in another directory in Jupyter notebook

馋奶兔 提交于 2020-11-30 04:19:51
问题 My question is related to this. I am using Python 3.6 in Jupyter Notebook. My project directory is /user/project . In this directory I'm building a number of models and each has it's own folder. However, there is a common functions.py file with functions that I want to use across all models. So I want to keep the functions.py file in /user/project but be able to call it from an .ipynb file in /user/project/model1 , /user/project/model2 , etc... How can I do this? 回答1: There is no simple way