Vincent, You're a savior! I can't tell you how appreciate I am. What a bonehead move on my part, leaving out that command; nevertheless, adding the `setup.py develop` call in .ebextension did the trick!
Best, Andrew On Sunday, July 17, 2016 at 8:14:07 PM UTC-7, Vincent Catalano wrote: > > Hey Andrew, > > I've deployed a number of Pyramid applications using Elastic Beanstalk. > First, make sure that your Elastic Beanstalk configuration is pointing to > the proper WSGIPath - I believe the default is app.py, but I would double > check this value in the control panel. > > Also, you will need to add a config command for your environment that runs > the `setup.py develop` command. To do this, you will need to add a file to > your .ebextensions folder named 01_packages.config (or use whatever naming > scheme you like) with the following: > > container_commands: > 01_setup: > command: "/opt/python/run/venv/bin/python setup.py develop" > > Next, run the `eb deploy` command. Elastic Beanstalk should now recognize > that your package is installed. > > On Sun, Jul 17, 2016 at 4:51 PM, Randall Leeds <[email protected] > <javascript:>> wrote: > >> It might be that if you have a requirements.txt that Beanstalk only >> installs that and not your package. Listing your package as an in place, >> editable install with an entry like "-e ." in the requirements file will >> make sure that your package is linked into the environment. >> >> On Sun, Jul 17, 2016, 16:30 Michael Merickel <[email protected] >> <javascript:>> wrote: >> >>> I don't have any beanstalk experience but this is definitely a >>> path/virtualenv issue. I'd add some code to output your sys.path and it >>> should be clear why your code is not available. It sounds like your >>> dependencies were installed but the package itself is not on the path. >>> >>> On Sun, Jul 17, 2016 at 5:05 PM, Andrew Burnett <[email protected] >>> <javascript:>> wrote: >>> >>>> Does anyone have experience installing a Pyramid application via Elastic >>>> Beanstalk? My application deploys but I cannot configure the >>>> application's application.py (or pyramid.wsgi) file to work properly. >>>> Within get_app the following error occurs: >>>> >>>> >>>> File >>>> "/opt/python/run/venv/lib/python2.7/site-packages/pkg_resources/__init__.py", >>>> line 829, in resolve[Sun Jul 17 21:24:15.482379 2016] [:error] [pid 736] >>>> [remote 127.0.0.1:9522] raise DistributionNotFound(req, requirers)[Sun >>>> Jul 17 21:24:15.482427 2016] [:error] [pid 736] [remote 127.0.0.1:9522] >>>> DistributionNotFound: The 'MyApp' distribution was not found and is >>>> required by the application >>>> >>>> >>>> Where MyApp is the application I am trying to run. >>>> >>>> >>>> Here is my application.py: >>>> >>>> >>>> from pyramid.paster import get_app, setup_loggingimport os, site, sys >>>> ini_path = os.path.join(os.path.dirname(__file__), 'production.ini') >>>> setup_logging(ini_path) >>>> application = get_app(ini_path, 'main') >>>> >>>> It seems as though the error occurs because its looking for MyApp >>>> within /opt/python/run/venv/lib/python2.7/site-packages/ rather than >>>> /opt/current/python/app/. What am I missing? Do I need to add >>>> something to my path? Does anyone have experience with this? >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "pylons-discuss" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected] <javascript:>. >>>> To post to this group, send email to [email protected] >>>> <javascript:>. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/pylons-discuss/94579979-dedf-4743-8f05-3d79e52a9a3f%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/pylons-discuss/94579979-dedf-4743-8f05-3d79e52a9a3f%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "pylons-discuss" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected] <javascript:>. >>> To post to this group, send email to [email protected] >>> <javascript:>. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/pylons-discuss/CAKdhhwGgH8_-ML8dHONJ909HFGepmMXT9XsU82n6n_HWy1c8Bw%40mail.gmail.com >>> >>> <https://groups.google.com/d/msgid/pylons-discuss/CAKdhhwGgH8_-ML8dHONJ909HFGepmMXT9XsU82n6n_HWy1c8Bw%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "pylons-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/pylons-discuss/CAAL6JQg7FsYJDP55qUzFsGbwLRRF85mOojMLEmPt0Mb8yROSWw%40mail.gmail.com >> >> <https://groups.google.com/d/msgid/pylons-discuss/CAAL6JQg7FsYJDP55qUzFsGbwLRRF85mOojMLEmPt0Mb8yROSWw%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Vincent Catalano > Software Engineer and Web Ninja, > (520).603.8944 > -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/d6e9c2b4-c1a7-4eb3-8c1f-93c866675a62%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
