installing django-remote-forms on pythonanywhere virtualenv - django

I want to install django-remote-forms on pythonanywhere virtualenv
but it seems pip repo dose not include django-remote-forms
and also whene I upload the files on pythonanywhere host I dont have required premission
for installing using setup.py
if any one could help me

You can install it directly from github:
pip install --user https://github.com/WiserTogether/django-remote-forms/archive/master.zip

Related

Can't apt-get install packages on pythonanywhere

I'm trying to deploy a django project to pythonanywhere. I'm using this package in my project:
https://github.com/algoo/preview-generator
In order for preview-generator to work it has the following requirements:
apt-get install zlib1g-dev libjpeg-dev python3-pythonmagick inkscape xvfb poppler-utils libfile-mimeinfo-perl qpdf libimage-exiftool-perl ufraw-batch ffmpeg
The Bash console in Pythonanywhere won't let me install packages as root. Is there any way for me to install these required packages on the pythonanywhere server?
I read that the best you can do is make a request to the pythonanywhere team to have the packages added in future versions. Is this still the case?

how to install python packages into nao's gentoo?

I want to install numpy,PIL packages into Nao robot's hardware for my project. (python 2.7, Nao 1.14.5 Gentoo lınux) How Could I do that? Thanks in advance.
As mentioned here: You might also not have root access on Nao, which limits where you can install.
you can install python packages with pip install but you need the --user tag
upgrade pip as descriped in the other post and
try
pip install --user yourPackage
respective:
/home/nao/.local/bin/pip install --user yourPackage
this will install the package to a directory where you have write access without root.

how to install pip remotely using ssh

Hi I hope someone can point me in the right direction.
I am trying to upload a django project which I have developed locally on my machine and now moved the project files to a server and am trying to install django on the server.
I have Python 2.7.5 installed and accessed the server remotely using ssh (putty) I can confirm Python is installed by running the command python --version
I don't have pip installed as when i run the command pip --version
I get following notification
-bash: pip: command not found
I am new to django and python so not sure what I should do to install both django and pip.
p.s In my requirements file and when working locally I have pip and django installed correctly and all working.
Ok, lets say you are already on your remote server. First thing to do is to install pip for your version of python. You can do this via:
sudo apt-get install python-pip
From now you have pip installed. Next thing to do is to install django globally in your system:
pip install django==1.11
Please note that django 1.11 is the last version that supports
python2
Next thing to do is to create django app:
django-admin startproject test_project
And the last thing is to install virtualenv
To install libraries for each of your django projects and keep them
separate
pip install virtualenv
Also note
If you have requirements.txt file with all libs, you can do something like this on your remote server:
pip install -r requirements.txt
That will automatically install all libraries at once
First you should understand which OS you're running:
uname -a
and:
lsb_release -a
When you find the OS version, you can easily follow this guide:
https://packaging.python.org/guides/installing-using-linux-tools/#installing-pip-setuptools-wheel-with-linux-package-managers

Django not installed in venv?

Would anyone know possible reasons why Django is being installed in the global site package and not my venv's site package folder?
Here's my set up and what I did, this is a bit detailed since I'm new to Python/Django and not sure which information is important:
Python 3.3 is installed in c:\python33
I have virtualenv, pip, easy_install installed in C:\Python33\Scripts.
My venv is c:\users\username\projects\projB
This venv was created using pyvenv, not virtualenv.
I activated the venv.
I changed directory to C:\Python33\Scripts to run "pip install django".
Django was created inside C:\Python33\Lib\site-packages and not inside C:\users\username\projects\projB\Lib\site-packages.
Do I need to install pip inside my venv and use that to install Django?
You can specify in your virutalenv wich python version you whant:
$ virtualenv -p <PATH TO PYTHON VERSION> my_virtualenv
Then:
$ source my_virtualenv/bin/activate
$ pip install Django==1.5.2
This will install the good version of django in your virtualenv according to your python version.
Thanks to virtualanv, you will be able to save/freeze and install your environement on another machine:
$ pip freeze > requirement.txt
$ pip install -r requirement.txt
You will see in the requirement.txt file the django dependency.
Pip should be installed when you create the virtual environment. Don't change directory into C:\Python33\Scripts before running pip. It looks like that means you use the base install's pip instead of your virtual environment's pip.
You should be able to run pip from any other directory. However I'm not familiar with python on Windows, so I'm not certain that pip is added to the path when you activate the environment. If that doesn't work, you'll have to change directory into the bin directory of your virtual environment, then run pip.
What happened to me was that I was trying to install django from outside the environment directory/folder.
So make sure you are inside the environment directory and then use pip install django

Pip with virtualenv not upgrading Django

I'm using pip with virtualenv --no-site-packages --distribute and am trying to upgrade Django. pip install -U Django should upgrade it according to the docs I found. However, it simply finds the current Django installation and stops.
Ideally, I would like to be able to specify the version I want to upgrade to. Currently, I'm stuck with modifying the requirements file, then blowing over the old virtualenv and starting a new one. However, I'd be happy just getting pip install -U to upgrade to latest version.
Check your build/ directory in your virtualenv path. Delete the Django/ dir there and try to run pip install --upgrade django again.