Amazon Beanstalk CLI Error: lib.utility, no module found - django

I am trying to follow the directions given for getting a Django application up on Amazon Beanstalk, and when I run the eb init command, I receive the following error:
Traceback (most recent call last):
File "/usr/local/AWS-ElasticBeanstalk-CLI-2.4.0/eb/linux/python2.7/eb", line 17, in <module>
from scli import core
File "/usr/local/AWS-ElasticBeanstalk-CLI-2.4.0/eb/linux/python2.7/scli/core.py", line 24, in <module>
from scli import command, cli_parse, config_file, prompt
File "/usr/local/AWS-ElasticBeanstalk-CLI-2.4.0/eb/linux/python2.7/scli/command.py", line 16, in <module>
from lib.utility import misc
ImportError: No module named utility
I am really unsure as to what I am failing to do or missing...

So it turns out that somewhere along this very terrible journey I downloaded the AWS Beanstalk CLI version 2.4, when I needed 2.6, in case anyone else makes this same clumsy mistake.

Related

Flask db migrate stops working on a new ec2 machine

So this is a bit weird. I took an image of my dev server (ec2), spooled it up onto a new machine, and all of a sudden "flask db migrate" stopped working for me. It now returns this error:
Traceback (most recent call last):
File "/usr/local/bin/flask", line 7, in <module>
from flask.cli import main
ImportError: No module named cli
I'm not particularly sure how to go about debugging this. A little guidance would be deeply appreciated.

Trouble getting a Python script to execute

I am trying to experiment around with brute forcing Bitcoin Brain Wallets via a Python script I pulled from github. How ever I am unable to get the script to run properly. I cannot get the requirements to install properly and running the script without returns:
Traceback (most recent call last):
File "C:\Users\CCTrollz\Desktop\bruteforce-bitcoin-brainwallet-master\bbb.py", line 7, in <module>
from lib.blockchain import Abe, BlockchainInfo, Insight
File "C:\Users\CCTrollz\Desktop\bruteforce-bitcoin-brainwallet-master\lib\blockchain.py", line 2, in <module>
import requests
ImportError: No module named requests
Github Project

How do I fix packaging issue when generating OpenAPI configuration file?

I am working through the Python Quickstart for Cloud Endpoints Frameworks on App Engine. I try to generate the OpenAPI configuration file by invoking the Endpoints Tool and get this error:
python lib/endpoints/endpointscfg.py get_swagger_spec main.EchoApi --hostname echo.endpoints.[YOUR-PROJECT-ID].cloud.goog
Traceback (most recent call last):
File "lib/endpoints/endpointscfg.py", line 59, in <module>
import _endpointscfg_setup # pylint: disable=unused-import
File "/Users/myName/lab/python-docs-samples/appengine/standard/endpoints-frameworks-v2/echo/lib/endpoints/_endpointscfg_setup.py", line 98, in <module>
_SetupPaths()
File "/Users/myName/lab/python-docs-samples/appengine/standard/endpoints-frameworks-v2/echo/lib/endpoints/_endpointscfg_setup.py", line 94, in _SetupPaths
from google.appengine.ext import vendor
ImportError: No module named appengine.ext
My understanding is that this is some kind of packaging issue? This is issue is discussed here but i am still stuck: Error running endpointscfg.py get_swagger_spec. Any help would be much appreciated.
It turned out to be an issue with my system variable path. Specifically I added:
ENDPOINTS_GAE_SDK="path to google_appengine"

Virtual env Python packages with Google Cloud SDK

I'm in the Getting Started section of Google Cloud SDK from Dan Sanderson's book, sorry no link.
The thing is I created a clock application with the local installation of Python.
Then I created a virtual environment, and ran the same application with the corresponding installation.
I installed the packages that I needed, but I get a strange error about -what I think- is one of the base Python packages.
(myenv) diego#host:gae-clock$ dev_appserver.py .
Traceback (most recent call last):
File ".../google-cloud-sdk/bin/dev_appserver.py", line 11, in <module>
import bootstrapping.bootstrapping as bootstrapping
File ".../google-cloud-sdk/bin/bootstrapping/bootstrapping.py",
line 9, in <module>
import setup
ImportError: No module named 'setup'
thank you for pointing in the right direction. Please let me know if I can show more to track this down.

PyCharm IDE: boto is already installed but got a "No module named boto.cloudfront" importError

I have already got boto installed to my python virtual environment, as shown in the screenshot of my pycharm project.
However I got an ImportError of boto.cloudfront when I run my script from pycharm
ERROR 2015-04-20 00:17:39,590 wsgi.py:263]
Traceback (most recent call last):
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 240, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
handler, path, err = LoadObject(self._handler)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 85, in LoadObject
obj = __import__(path[0])
File "/Users/antkong/dev/test/testmain.py", line 7, in <module>
from boto.cloudfront import CloudFrontConnection
ImportError: No module named boto.cloudfront
In the python console, I can import the library just fine:
Any suggestion what can go wrong here?
My project is a Google App Engine project. So even though boto is installed locally, it is not visible to my code within my Google App Engine project
My solution is to copy the boto and all dependency into a lib subdirectory and then add it to the sys.path