pip install django-adaptors overwriting 1.5 version of Django - django

When I install django-adaptors using pip install django-adaptors it also seems to install django 1.4 in the process, which overwrites my django 1.5 installation.
How can I install django-adaptors without it overwriting my version of Django?
Thanks

pip install django-adaptors --no-deps

It's an issue with the packages setup.py. You can see the source here: https://raw.github.com/anthony-tresontani/django-adaptors/master/setup.py
It defines 'Django==1.4' rather than 'Django>=1.4' so it will install Django 1.4 therefore overriding your 1.5 install.
All I can suggest is alter your requirements.txt so django-adaptors is above Django==1.5 so when pip installs 1.5 would be installed after django-adaptors has installed 1.4.

You could simply run pip install django -U after having installed django-adaptors. That will give you django-adaptors, all its dependencies and django 1.5. You could also simply download django-adaptors and change its dependencies file.
The advantage of this approach is that it is easily repeatable when you are moving to a production server (for instance in a fabric script).
One caveat, though: read the django 1.5 release notes to know whether you are likely to encounter any problems.

I just uploaded django-adaptors 0.2.4 which integrate Andrew Ingram fix that that.
You, then, just have to do again:
pip install django-adaptors

Related

virtual env python 3.5 only finds django python 2.7

I have created python 3.5.2 virtual environment ("python --version" confirms that)
but when i try to install django using "pip install django~=1.10.0" I get this message:
Requirement already satisfied: django~=1.10.0 in /usr/local/lib/python2.7/dist-packages
How can I get django version that agrees with the python version in my venv?
Personally I use conda to manage environments and I'm not really familiar with virtualenv, but a few things to check.
I bet you need to use pip3 not pip (aka pip2) to install django that way it will be installed in your python 3 env.
Probabily you have already installed django outside the venv with python2.
just write see in the pip list if django is installed.
Then uninstall, enter in the venv and reinstall django with python3
Ok - so I figured out what happened. I have installed django using sudo pip install. Even though I was in the venv (created with python3) this has resulted in reference to django outside the venv. Sooo...it was an interesting thing to learn I guess.

django update version without pip

I want to update my django version (1.8 ->1.9).
My current version was installed using pip (pip install Django) .
Now I need to install a newer version without pip.
I think I should run from the django package folder, using the setup.py file:
python setup.py install
[I've installed some other packages using a setup.py file .]
The question - will that create some problems? And, does the setup.py install method take care for uninstalling the older version? Or I have to uninstall manually somehow?
I don't have internet connection in this computer, so no pip.
Download a release (they are available on GitHub), and copy to your computer.
Then use pip install to install the archive. For example
pip install django-1.9.3.tar.gz
For more ways to use pip install, see the docs.

I used virtualenv and installed django1.9 . But I need to uninstall 1.9 and install 1.7. How to do that. Tell me whether that is possible?

I used virtualenv and installed django1.9 .But I need to uninstall django1.9 and install django1.7.
How to do that?
Tell me whether that is possible?
In your virtualenv, do the following
pip uninstall Django
pip install django==1.7

How to install Django on different version of PYTHON?

I have two python versions 2.6 and 3.0. I want to install django1.3 in python3.0's site-package directory and my default python setting is on 2.6. I also added path /usr/local/bin/python3.0 and /usr/local/bin/python3.0 into .bashrc file.
Please help me.
Django is not compatible with Python 3. You must install it in the 2.X branch.
However, what you want to achive will be easier done using virtualenv:
easy_install virtualenv
virtualenv project --python=python2.6
source project/bin/activate
pip install django
Django doesn't yet work with python3.0. So it is better you install it on the python2.6 dist-packages folder.
That said, if you had python2.7 and wanted to install django on python 2.7, while the better approach is to use virtualenv, a simple solution is to:
python2.7 setup.py install
or
easy_install2.7 django
or
/path/to/python2.7/dist-packages/pip/pip install django
easy_install virtualenv
pip install django
Sudo pip install django
Seemed to work for me!
by using pip install django --> it installs the latest version of django.
https://technicalforum.wordpress.com/2016/12/17/introduction-to-django/

Uninstalling old version Django for upgrade to latest version

I want to upgrade Django from 1.2.5 to 1.3. I uninstalled 1.2.5 version, by the Ubuntu Software Center, for future upgrading, but it still in dist-packages and it still imported in python shell. What should I do? Would it be normal if I would brutally deleted the folder and egg from dist-packages?
It runs on Ubuntu 10.04
I recommend using setup-tools. Then run
easy_install --upgrade django
It will remove current django path from PYTHON_PATH and will add it's own path. To get easy_install do:
apt-get install python-setuptools
For both actions sudo is needed.
Go to the /usr/local/lib/python2.6/dist-packages. Find django folder there and delete it. then download django 1.3 and run python setup.py install. This should do the trick.
Remove django version using pip:
pip uninstall django
And install the version you want, for example 1.5:
pip install django==1.5