How to start vagrant/heroku - python

I found a article online that explains how to connect vagrant to heroku, so I would be able to deploy my applications online. I got to step 4 in the article, but I got an error when I tired to install foreman (gem install foreman). How can I get it to install. Does any one used vagrant and heroku before and can they explain how they got it to work. The picture of the error is at the bottom and here is a link of the article: https://www.udacity.com/wiki/ud330/deploy.

There is a permission issue with the path /usr/local/lib/python2.7/dist-packages/gunicorn
You can try one of the following
1) Use chmod to grant write permission to the location /usr/local/lib/python2.7/dist-packages
or
2) Rerun your command with sudo

Related

How do I allow permissions so that i can run my python server?

I was trying to practice using django,
when I executed python3 manage.py runserver, I received a permission denied when trying and I'm not sure what that means.
I have seen this before, but I am not sure how I would be able to allow permissions. I thought I enabled everything in start up but I feel I am missing something.
I will post a picture here from when I went into the folder I started and tried to run the server.
have you tried using sudo before the "python3 ..." command?
(I can't add this to comments due to my low reputation)

Permission Denied when using mkdir() in Docker Terminal

I am trying use Google Earth Engine's Python API on my 'Windows 10 Home' computer, for which Google recommend I set up a docker container (https://developers.google.com/earth-engine/python_install).
Following the instructions here (https://developers.google.com/earth-engine/python_install-datalab-local), I have downloaded Docker Toolbox and successfully run the docker run hello-world command.
However, when I try to run the following code:
set "GCP_PROJECT_ID=YOUR_PROJECT_ID"
set "CONTAINER_IMAGE_NAME=gcr.io/earthengine-project/datalab-ee:latest"
set "HOME=%HOMEDRIVE%%HOMEPATH%"
set "WORKSPACE=%HOME%\workspace\datalab-ee"
mkdir "%WORKSPACE%"
cd %WORKSPACE%
I get the following error on the 5th line: mkdir: cannot create directory '%WORKSPACE': Permission denied.
Does anyone know what's causing this? I have only ever use Anaconda Prompt and am not used to the syntax of this terminal.
Also, just to clarify, I entered the correct project ID into the terminal for line 1, but have not shared it here.
Problem solved. I was using the Docker Quickstart Terminal. Switched to Windows Command Prompt and everything running fine.
You may need to add yourself to the docker user group.
Run the following command in your shell or terminal window:
sudo usermod -a -G docker ${USER}
where user is the google user with which I log in to the console, after executing the command it is necessary to restart the terminal.

Installing Flask on Ubuntu

I'm having difficulty installing Flask on my Ubuntu machine. In fact, I tried 2 different Ubuntu computers and neither of them worked.
I followed this tutorial https://pythonprogramming.net/creating-first-flask-web-app/ where all steps are well explained.
The problem is. When I type localhost:5000 or just localhost or 127.0.0.1:5000 I get "Can't connect. Something is broken" you know that sort of message you get when server can't find index.html or index.php
Everything during the installation went okay. The only thing that didn't work well was installing virtual environment. It downloaded okay but when I ran sudo virtualenv xyz I got No such command. But Django & Flask can work without it so it shouldn't be an issue.
Any ideas ?
I deleted those as Flask don't need files to be named index.html.

Cannot connect to Heroku through cmd line

I have a Django project that I have deployed on a heroku web server and use PyCharm as my IDE. I used to be able to interact with my web server with "heroku run bash", however, now when I try running "heroku run bash" I get:
▸ stat /.local/share/heroku/client/bin/heroku: not a directory
▸ fork/exec /.local/share/heroku/client/bin/heroku: not a directory
I'm not sure what has changed, but I can't seem to connect to my heroku webserver anymore. I can still push changes using git push heroku master, but any other interaction with my heroku server doesn't seem to work anymore. I've already checked with Heroku and their systems are running just fine.
How do I reconnect to my heroku web server again with PyCharm? Or just in general?
Thanks in advance for your help!
This is either due to a new version of the CLI or to an OS upgrade.
I experienced the exact same issue on my Mac after upgrading to High Sierra and resolved it by reinstalling the CLI, this time using Homebrew.
Had the same problem. Did the following steps, as described here:
1) brew install heroku/brew/heroku
2) which heroku pointed to /usr/local/bin/heroku so no problems there
3) finally brew link --overwrite heroku
After this, everything was sorted and worked as expected.

Django RaspberryPi cannot connect to webserver

I'm following this website to connect raspberry pi with web server. All the steps are done correctly including the last one. Then I tried to go to http://127.0.0.1:8000/ but got this message from chrome:
"This site can’t be reached
127.0.0.1 refused to connect.
ERR_CONNECTION_REFUSED"
I didn't know what to do so just changed the last command into
python manage.py runserver 192.168.0.29:8000
(192.168.0.29 is my RPi inet address)
and then chrome threw this line:
"A server error occurred. Please contact the administrator."
meanwhile on RPi, it threw an
ImportError: No module named 'django.middleware.security'
How do I solve this problem? Thanks
Have you actually set up your django project by running django startproject? That should set up the file structure for you correctly and you should be able to then run manage.py runserver and see your project running with the admin services run from your ip/admin.
you should install django on your pi.
Using pip:
sudo pip install django
Using apt-get
sudo apt-get install python-django

Categories

Resources