how to install django-sphinx-autodoc - django

i have found this django apps django-sphinx-autodoc in http://pypi.python.org/pypi/django-sphinx-autodoc ...
I can't find the docs on how to install it
do anyone knows how to install this app?

Ubuntu's package repositories don't have django-sphinx-autodoc, so you will have to install it yourself.
If you do have pip or distribute installed, you can use those to install anything from PyPi.
distribute gives you the command easy_install, which acts as a kind of package manager for Python. pip is the same thing, with additional functionality.
For you, you can install with:
sudo easy_install django-python-autodoc
If you have pip, you can do this:
sudo pip install django-python-autodoc

Related

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.

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.

Installing MySQL-python for Django

I've just learned how to use virtualenv and I installed Django 1.4.5. I'm assuming that the virtualenv created a clean slate for me to work on so with the Django 1.4.5 installed, I copied all my previous files into the virtualenv environment.
I tried to run the server but I get an error saying "no module named MySQLdb". I think this means that I forgot to install MySQL-python. I tried to install it via
pip install MySQL-python
But I get this error
Downloading/unpacking MySQL-python
Running setup.py egg_info for package MySQL-python
The required version of distribute (>=0.6.28) is not available,
and can't be installed while this script is running. Please
install a more recent version first, using
'easy_install -U distribute'.
(Currently using distribute 0.6.24 (/home/bradford/Development/Django/django_1.4.5/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg))
Complete output from command python setup.py egg_info:
The required version of distribute (>=0.6.28) is not available,
and can't be installed while this script is running. Please
install a more recent version first, using
'easy_install -U distribute'.
(Currently using distribute 0.6.24 (/home/bradford/Development/Django/django_1.4.5/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg))
----------------------------------------
Command python setup.py egg_info failed with error code 2 in /home/bradford/Development/Django/django_1.4.5/build/MySQL-python
Not quite sure how to go about fixing this problem =/ any help much appreciated!
I recently had exactly this issue (just not in relation to Django). In my case I am developing on Ubuntu 12.04 using the default pip and distribute versions, which are basically a little out of date for MySQL-python.
Because you are working in an isolated virtualenv, you can safely follow the suggested instruction without affecting your Python installation.
So you can...
workon your_virtualenv #activate your virtualenv, you do use virtualenvwrapper, right?
easy_install -U distribute #update distribute on your virtualenv
pip install MySQL-python #install your package
If for some reason upgrading distribute is not an option, you could try installing an older version of MySQL-python as follows (you'd have to check this version is compatible with your version of Django):
pip install MySQL-python==x.y.z #where x.y.z is the version you want
Spent an hour looking through stackoverflow. Evntually found answer in the other question. This is what saved me:
sudo apt-get install libmysqlclient-dev
mysql_config goes with the package.
When doing in a virtualenv :
pip install MySQL-python
I got
EnvironmentError: mysql_config not found
To install mysql_config, as Artem Fedosov said, first install
sudo apt-get install libmysqlclient-dev
then everything works fine in virtualenv
MySQL driver for Python (mysql-python) needs libmysqlclient-dev. You can get it with:
sudo apt-get update
sudo apt-get install libmysqlclient-dev
If python-dev is not installed, you may have to install it too:
sudo apt-get install python-dev
Now you can install MySQL driver:
pip install mysql-python
Here is a more detailed documentation for MySQL in Django:
http://codex.themedelta.com/how-to-install-django-with-mysql-in-a-virtualenv-on-linux/
I had to do this:
pip install mysql-python
inside the virtualenv
The commands are always run in ubuntu:
easy_install -U distribute
later
sudo apt-get install libmysqlclient-dev
and finally
pip install MySQL-python
The suggested solutions didn't work out for me, because I still got compilation errors after running
`$ sudo apt-get install libmysqlclient-dev`
so I had to run
apt-get install python-dev
Then everything worked fine for me with
apt-get install python-dev
Try this:
Version Python 2.7
MySQL-python package, you should use either MySQL_python‑1.2.5‑cp27‑none‑win32.whl or
MySQL_python‑1.2.5‑cp27‑none‑win_amd64.whl depending on whether you have installed 32-bit or 64-bit Python.
pip install MySQL_python‑1.2.5‑cp27‑none‑win32.whl
if you are using mysqlclient package, then use
mysqlclient‑1.4.6‑cp27‑cp27m‑win32.whl or
mysqlclient‑1.4.6‑cp27‑cp27m‑win_amd64.whl
pip install mysqlclient‑1.4.6‑cp27‑cp27m‑win32.whl
https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient

How can I install python-Orange on ubuntu 12.10

sudo apt-get install python-Orange
or
sudo apt-get install python-orange
doesn't work
sudo python setup.py install
sudo python setup.py build
is not working as well.
Can anyone help??
Python has two tools for easy installation of all programs that are listed on the Python Package Index, also known as PyPi: These are easy_install and pip. Both retrieve very recent versions of Orange (and of any other package that is updating its PyPi entry regularly).
I installed Orange on Ubuntu 12.04 (LTS) with
pip install orange.
You will see lots of log lines indicating that Pip is downloading and compiling Orange for you. Simply wait. When pip is ready, fire up python and try to import orange. If that works, quit python and try the GUI with python /usr/local/lib/python2.7/dist-packages/Orange/OrangeCanvas/orngCanvas.pyw (you probably want to create a shell alias or bash script for that one :-)
NOTE: on 12.04 I needed to first upgrade 'distribute' itself with sudo easy_install -U distribute but this was clearly indicated by pip.
https://pypi.python.org/pypi/Orange/2.6/
You need to extract the dowloaded tarball on that page to a folder and then change directory to that folder. Then the sudo python setup.py... instructions will work (but you should 'build' the application before you 'install' it).
go to the given link "https://pypi.python.org/pypi/Orange/2.6/"
download the package and extract the file
install with given command
python setup.py build
python setup.py install
note:- during installation make sure that your net is working because it downloads required packages. Also it may ask for C++ or gcc compilers while installing and could be terminate just read the errors care fully and install requires packages from the synaptic package manage in ubuntu.

How can I tell whether/where python a virtualenv has been set up? (aka installing lxml on bitnami's djangostack)

I'm working on a django application on the bitnami djangostack. I want to use the lxml library, but I haven't been able to install it. Or rather, I haven't been able to install it where django can find it.
I've already used apt-get to install the libxml2, libxslt, and python-dev dependencies. Both of these commands report success*:
sudo pip install lxml
sudo apt-get install python-lxml
easy_install fails with a super-long error message that makes me think it can't find the dependencies. (I've run into this problem before.)
When I open up python or call python manage.py shell and try "import lxml", I get
"ImportError: No module named lxml"
As best I can tell, bitnami has set up a virtual environment for django, and pip and aptitude are installing lxml perfectly -- to the wrong python. Assuming that's all correct, how do I get lxml installed to the right one?
When you use apt-get install you are installing system libraries. BitNami DjangoStack is self-contained and independent. You could upgrade or remove your system libraries with apt-get and it would not be affected. Unfortunately lxml is not included in the stack nor libxslt which is a depency. We will include it in a future version however please find below the steps for manualing installing lxml on top of the python version included in BitNami DjangoStack.
You will need to use the system libraries for libxslt and libxml2. Be sure that you have them installed:
sudo apt-get install libxml2 libxml2-dev libxslt1.1 libxslt1-dev
Download lxml and uncompress it:
wget http://lxml.de/files/lxml-2.3.2.tgz
tar zxvf lxml-2.3.2.tgz
cd lxml-2.3.3
Load the BitNami environment:
. path_to_your_djangostack_installation/scripts/setenv.sh <-- notice the space between the dot and the path to the script.
which python <-- the output should be the python version from BitNami.
Install lxml specifying the path to your system libraries (notice that you should execute this command in the lxml directory):
python setup.py install --with-xslt-config=/usr/bin/xslt-config --with-xml2-config=/usr/bin/xml2-config
Now executing import lxml in the python console should work.
(This was already replied here)
There have been a couple of blog postings on installing this library on shared hosting. http://rhodesmill.org/brandon/2009/installing-lxml-on-webfaction/
How to install lxml for python without administative rights on linux?