When trying to set up AWS Elastic Beanstack for my Django project following this tutorial:
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-django.html
once I get to running
eb create django-env
I get this error:
warning: CRLF will be replaced by LF in .gitignore.
The file will have its original line endings in your working directory.
Creating application version archive "app-2f30-181013_230403".
ERROR: CommandError - An error occurred while handling git command.
Error code: 1 Error: C:\Program Files\Git\mingw64/libexec/git-core\git-submodule: line 7: basename: command not found
C:\Program Files\Git\mingw64/libexec/git-core\git-submodule: line 7: sed: command not found
C:\Program Files\Git\mingw64/libexec/git-core\git-submodule: line 18: .: git-sh-setup: file not found
Any ideas what the issue is here? is AWS Elastic Beanstack unusable from Windows?
You have a Windows path and program compatibility problem.
The EB CLI works just fine on Windows. I use it almost everyday on many corporate systems for different customers. This assumes that everything is installed and setup correctly.
1) Make sure that you have installed the Windows native version of Git. Install from this location:
Downlading Git
2) Make sure that the Windows native version of Git is before Mingw in your Windows search path. Otherwise the wrong program will be loaded and then all the Mingw environment and dependencies will mess everything up.
3) Make sure that the latest version of EB CLI is installed (do this last). Follow these steps to repair your current installation. Depending on what you have setup, just installing EB CLI may be enough.
Install Python, pip, and the EB CLI on Windows
Related
I have a Django App deployed via AWS' elastic beanstalk, that uses the CodePipeline service to build. As part of that pipeline, the CodeBuild service is used to build the app that gets deployed to the ElasticBeanstalk environment.
The build failed, sending the following error message:
django.core.exceptions.ImproperlyConfigured: SQLite 3.9.0 or later is required (found 3.7.17).
Per Amazon's own package version listing I realize that is expected given the older version is intended to be on the Amazon Linux 2 distro.
Ok. I wrote a shell script to download the latest version of SQLite and build from scratch, but I'm still getting the same issue.
In the buildspec.yaml file I have the following:
...
post_build:
commands:
- echo "beginning post-build phase..."
- bash get_sqlite.sh
- echo "sqlite version -- $(sqlite3 --version)"
- python manage.py makemigrations
...
In the CodeBuild logs, I can see the result of the echo command as such:
sqlite version -- 3.40.1 2022-12-28
Yet, the build fails and the logs still show the following error:
django.core.exceptions.ImproperlyConfigured: SQLite 3.9.0 or later is required (found 3.7.17).
Any idea what further steps need to be taken for the updated version to be detected rather than the previous one?
I think you need to move your sqlite command to bin directory in linux.
- mv sqlite /usr/local/bin/
Even though package has been updated but linux reads PATH ( env variable to find the commands ) and still it is finding the old version of the command, that is hwy you need to replace the old sqlite command with the new version in bin directory
I am using on a 64-bit system running Windows 11 with Python 3.7 installed and working in a virtual environment where I have installed Django 3.2. I am trying to deploy my project using Heroku.
I have tried adding heroku cli 64-bit Windows version to various paths. I have set the env variable HOME with a value of C:/Users/<username>/_netrc. I have cleaned up the path on each installation so there is only the current path.
When I run heroku login from within my project, I get the following error:
EPERM: operation not permitted, open C:/Users/<username>/_netrc
Any help here is appreciated
I have set the env variable HOME with a value of C:/Users/<username>/_netrc
HOME should be a directory. Heroku will take care of the _netrc part.
Try setting it to C:/Users/<username>/ instead.
delete the existing file in path C:/User//_netrc
used git bash or terminal for it as i was unable to find the _netrc file in file Explorer.
after deleting It run the below command in project folder.
heroku git:remote -a <heroku_app_name>
by running the above command it will create a new _netrc file
I am installing aws-cdk on windows 10 home edition using powershell as administrator.
After successful installation and calling cdk - version, I keep getting error messages from the Windows Script Host:
Script
C:\Users..\ApData\Roaming\npm\node_modules\aws-cdk\bin\cdk.js
line 1
Character 1
...
Code: 800A03F6
Source: Compilation Error in Microsoft JScript
To solve the problem
I tried npx -p aws-cdk cdk --version.
I uninstalled node and aws-cdk, restarted windows and reinstalled everything.
Everything without success.
Error 800A03F6 can mean anything and only occurs in connection with cdk --version command. I don't have a proxy and have used an antivirus program.
I just fixed this problem by changing the path in the environment variable:
https://stackoverflow.com/a/67566915/12408270
change environment variable PATH to:
C:\Users\${your_username}\AppData\Roaming\npm
I'm having trouble installing and configuring Leiningen on a Windows 7 work computer. I'm assuming that my company's firewall prevents the GitHub security certificate from authenticating.
I've tried to use the standalone jar but had trouble using it will several development tools Id like to use to work on Clojure projects.
What is the best way to get Leiningen set up given these circumstances? Is there a way to install curl or wget on Windows and call them from the batch file?
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
The error Im getting is:
Downloading Leiningen now...
'powershell' is not recognized as an internal or external command,
operable program or batch file.
Failed to download https://github.com/technomancy/leiningen/releases/download/2.
7.1/leiningen-2.7.1-standalone.zip
It is possible that the download failed due to "powershell",
"curl" or "wget"'s inability to retrieve GitHub's security certificate.
The suggestions below do not check certificates, so use this only if
you understand the security implications of not doing so.
The PowerShell failed to download the latest Leiningen version.
Try to use "curl" or "wget" to download Leiningen by setting up
the HTTP_CLIENT environment variable with one of the following
values:
a) set HTTP_CLIENT=wget --no-check-certificate -O
b) set HTTP_CLIENT=curl -f -L -k -o
NOTE: Make sure to not add double quotes when setting the value
of HTTP_CLIENT
Thanks!
I would suggest downloading and installing Git Bash (aka "Git for Windows), which includes not only Git but a nice linux-like environment (a leaner version of Cygwin). At that point you will avoid any Powershell-related problems, which your error msg seems to imply.
https://git-scm.com/download/win
I'm having trouble installing AWS Elastic Beanstalk command line tool and I don't understand why. I've downloaded the package from AWS and followed the instruction carefully. Following is the installation instruction:
== Installation
Once you have downloaded the CLI package:
1) Unzip this archive to a location of your choosing.
Eb is located in the "eb" directory. The complete CLI reference
for more advanced scenarios can be found in the "api" directory.
To add eb files to your path:
Linux/Mac OS X (Bash shell):
export PATH=$PATH:<path to eb>
Windows:
set PATH=<path to eb>;%PATH%
I'm using Mac OS X so I've used export PATH=$PATH:. For the path to eb, I've just copied the file into the terminal, which resulted export PATH=$PATH:/Users/lydia/Downloads/ElasticBeanstalk/eb/macosx/python2.7/eb. I'm not sure what I'm missing and I can't deploy without downloading eb command line first.
Remove the eb at the end so it's just
/Users/lydia/Downloads/ElasticBeanstalk/eb/macosx/python2.7/
this worked for me although i can only get it to work if i export the CLI into the specific website folder i am working on see my question here https://askubuntu.com/questions/428417/aws-elastic-beanstalk-command-line-tool-setup
Fix that worked for me (if you installed python using brew) is remove python via
brew uninstall --force python
and then install it again from https://www.python.org/downloads/.
Then just follow the instructions from AWS.
You only add directories to your $PATH. Is ~/Downloads/ElasticBeanstalk/eb/macosx/python2.7/eb a directory? Or is it the actual command?