I'm trying to install Django-Avatar onto heroku.
I tried django-avatar==2.0a9 in my requirements.txt
but got the error:
"No distributions matching the version for django-avatar==2.0a9"
I then tried django-avatar==github.com/jezdez/django-avatar/archive/master.zip and got the error:
"No such file or directory:
'/app/django-avatar==https:/github.com/jezdez/django-avatar/archive/master.zip"
Any thoughts on how I can get django-avatar installed?
I appreciate the time and expertise.
you cannot directly install some thing on heroku.
create a virtual env and
install django-avatarin local machine,
update the requirements file using pip freeze > requirements.txt
then push the changes.
Refer this document https://devcenter.heroku.com/articles/django
Related
Recently I tried to deploy my django app in google app engine (standard environment - Python version 3.7 - Django version 2.0.3) but I found a problem.
As a previous step to do the deploy I run:
pip freeze > requirements.txt
But at the time of deploy this error was generated:
Error message: `pip_download_wheels` had stderr output:
Failed building wheel for PyYAML
ERROR: Failed to build one or more wheels
error: `pip_download_wheels` returned code: 1.
When I realized that the error was due to PyYAML I tried to modify the version in the requirements.txt file, but it didn't work.
As last step I opted to remove PyYAML from my requirements.txt file and in this case it worked. The application is deployed and working.
However my question is: Is there a problem with having deployed without including PyYAML in the requirements.txt?
For those who might be interested, the answer is this:
Google app Engine (standard environment) does not allow to install PyYaml since by default it has it installed:
https://cloud.google.com/appengine/docs/standard/python/refdocs/
Therefore there is no problem with not add PyYaml in the requirements.txt
PD: it seems that the library PyYaml is added to requirements.txt file due to the fact that pip is recognizing the yaml file in the folders and determines that it is necessary for the application to work correctly.
I have a Django project copied from a system. I have copied it to my system and I have put it in Apache www directory. Now When I run command
$python mamange.py runserver
it is giving error Import Error: NO module named jet
can anyone please identify bug. Thanks in advance
You need to make sure you have all of your dependencies installed. If you have a requirements.txt (or similar) file run pip install -r requirements.txt (in the folder where the file is). Other wise you will need to install the requirements manually pip install <list of requirements>
Good day.
I'm a newbie to Django and I have a slight confusion:
When deploying my Django app, do I need to deploy it with all the Python 'come-with' modules, or the hosts already have them installed.
Also, I installed PIL for image manipulation. Would they also have it installed or i have to find a way to install it on their servers. Thanks in advance
do I need to deploy it with all the Python 'come-with' modules
Never do that. It might conflict with the dependencies on the server. Instead issue the following command to create a dependency file (requirements.txt).
pip freeze > requirements.txt (issue this command where manage.py is located)
On the server create a new virtual environment. Now copy django project to the server (you can do this using git clone or just plain old Filezilla). Activate virtual environment. Then change you current working directory to the where manage.py is located. to install all the dependencies issue the following command.
pip install -r requirements.txt
This will install the required dependencies on on server.
I'm trying to install Django using pip on my windows machine, however i keep getting an error in command prompt:
Fatal error in launcher: Unable to create process using '"'
I've been searching around on the internet for solutions, but I cant seem to find any.
Thanks in advance
Make sure you have a virtual env setup. Then activate it and try installing django.
Try use the python installation from Active State http://www.activestate.com/activepython/downloads
I'm a Linux User but I've used python and Django on Windows with ActiveState.
When you install it, the installation create a folder with any utils tools, like pip, easy_install and etc... And the pip of this script works well
Have you tried
python -m pip install django
as advised here
I tried below 2 methods to install django_twilio module on Heroku
1) Ran 'heroku run pip install django-twilio'
2) Added 'twilio==3.6.3' to requirements.txt and start the server on heroku.
When I run 'heroku run pip freeze' I can see the twilio entry. But when I go into python and run 'import django_twilio' I get a module not found error.
Please suggest how to fix this on heroku. Same steps worked fine on my local machine.
You didn't add the proper requirement, you only installed the twilio library. Your requirements.txt should include the following line:
django-twilio==0.4
Which will include all the other dependencies you'll need. The full pip freeze, after installing django-twilio looks like this:
Django==1.5.5
django-twilio==0.4
httplib2==0.8
six==1.4.1
twilio==3.6.3
unittest2==0.5.1
As a rule of thumb, always run pip freeze > requirements.txt before pushing an update to Heroku (assuming new dependencies were installed), to make sure you have a complete snapshot of your environment.