Skip to content

Instantly share code, notes, and snippets.

@zhanghui9700
Created April 14, 2014 02:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zhanghui9700/10611261 to your computer and use it in GitHub Desktop.
Save zhanghui9700/10611261 to your computer and use it in GitHub Desktop.
cache import error and try fixed it
#!/usr/bin/python
import os, sys
try:
import packstack
except ImportError:
# packstack isn't installed, running from source checkout
sys.path.insert(0, os.path.join(os.path.split(sys.argv[0])[0], ".."))
import packstack
os.environ["INSTALLER_PROJECT_DIR"] = os.path.abspath(os.path.split(packstack.__file__)[0])
from packstack.installer import run_setup
run_setup.main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment