This message was deleted.
# python
s
This message was deleted.
n
this is a known python thing, the way we got around this was to have part of the bootstrapping adding the project root folder to PYTHONPATH and dump that to .bashrc/.zshrc Adding the path to sys may work, but it's a bit unamntainable IMO and I preferred to do that at another level
Copy code
pythonpath-add:
	@if [ -f ~/.zshrc ]; then\
		if [ $(shell cat ~/.zshrc | grep "export PYTHONPATH=\$$PYTHONPATH:$$(pwd)" | wc -l) -eq 0 ]; then\
			echo "export PYTHONPATH=\$$PYTHONPATH:$$(pwd)" >> ~/.zshrc;\
		fi;\
	elif [ -f ~/.bashrc ]; then\
		if [ $(shell cat ~/.bashrc | grep "export PYTHONPATH=\$$PYTHONPATH:$$(pwd)" | wc -l) -eq 0 ]; then\
			echo "export PYTHONPATH=\$$PYTHONPATH:$$(pwd)" >> ~/.bashrc;\
		fi;\
	else\
		echo "No shell recognized, append `export PYTHONPATH=$PYTHONPATH:/path/to/this/folder` to your shell configuration file";\
	fi