I recently added a yandex-maps application to my django project, fulfilling all the installation instructions. However, when I try to open the page with {% load yandex_maps_tags %} tag, I get an error:
TemplateSyntaxError: 'yandex_maps_tags' is not a valid tag library: ImportError raised loading yandex_maps.templatetags.yandex_maps_tags: Could not find the GEOS library (tried "geos_c", "GEOS"). Try setting GEOS_LIBRARY_PATH in your settings.
I didn't install a custom version of GEOS library, I didn't install it at all. However, when I click on the import line in yandex-maps library and press ⌘-B, I'm taken to GEOS's library __init__.py file, which is located at /Library/Python/2.7/site-packages/django/contrib/gis/geos/__init__.py. I don't know what is supposed to be a standard path for this library, but it looks like it to me.
I'm completely lost with this error. What can I do about it?
In order to use django.contrib.gis.geos you need first install GEOS library. Here are the instructions.
If you'll still have problems, see Can’t find GEOS library django docs.
Hope that helps.
Related
Trying to access the todoist api, and I copied some code from the api documentation. However, on my system I get an error stating:
Unable to import 'todoist.api'pylint(import-error).
I installed it with:
pip install todoist-python
as mentioned in the documentation
from todoist.api import TodoistAPI
I get my error on the very first line. How do I not get this?
You did everything right, so it's probably related to the way your installation is set.
Be sure you are using the same python you used to install the library. Check if the library is installed (pip list) and check if you're using the right Python when running the code. It's possible that the library was installed in one version and you're using the other.
I had the same problem, I solved it by following the GitHub instructions, but the name of the module to install using pip is todoist.
I'm using netbeans to write a simple python program which I need the requests module for, I've downloaded requests through terminal and it all seems to be fine there but netbeans can't seem to find it.
This is the error that it's throwing up:
import requests
ImportError: No module named requests
I've tried installing the requests library directly into the python folder but the folder won't let me paste anything into it.
There do seem to be answers on the netbeans forums but their server is down so won't let me on their website to my annoyance!
EDIT
I've tried to run python setup.py install as per other answers on the website but had no luck.
EDIT
have tried completely uninstalling python and requests to make sure it wasn't an installation error but still no luck.
This clearly looks like an error of installation of the request module to some other place than where your netbeans expects when running the code.
In your console run
which python
Check if this gives the same path as the one set in your netbeans. You can set your path by adding new platform using Tools > Python Platforms > New:
I would suggest that you learn bit more about sandboxed environments such as virtualenv. This article shows how you can use a virtualenv to install packages and use the same virtualenv for netbeans so that whatever packages you install in the virtualenv will be available in the netbeans for you to use. For this case, it could be requests.
In the end I gave up with requests, as I was using requests to get json data from an API I decided just to go back to the drawing board and start over rather than attempt to fix something that I couldn't work out. I am now using the urllib import and whilst this may not be the most efficient way it works which is the most important thing.
Dear fellow programmers,
I would like to use R inside of a ipython notebook. On the system (Centos) I am working on exists an older version of R (2.15). I was able to execute R-code with this version in a ipython notebook, however, I need a newer version of R with extra packages and because I don't have administrative right for that machine, I have a local machine on which I installed the newest version of R (3.1.2). I compiled the source on my pc and flagged it in a way that it can be assessed by extensions. After that I installed rpy2 with pip and this installation went without any errors.
I also can import the rpy2 package, but when I try to load libraries, I get an error message:
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/my/homedir/Software/R-3.1.2/library/stats/libs/stats.so':
libRlapack.so: cannot open shared object file: No such file or directory
During startup - Warning message:
package \u2018stats\u2019 in options("defaultPackages") was not found
I looked it up, all libraries are present and I don't get an error when I use R without ipython.
Anyone has ideas?
Best,
Daniel
Have you tried this?
http://www.lfd.uci.edu/~gohlke/pythonlibs/#rpy2
It's very weird when you say you need admin right to update R version because R usually doesn't require admin right to be installed. Make sure you install that under your user folder, instead of somewhere in the system drive.
While trying to use the RPi python module installed on RaspberryPi, using it in one of my request definition in views.py I get
Module not imported correctly!
This is the traceback that I got. Note that I'm using this repo as a starting point.
What would be the right way to install RPi and use it properly in Django ? I need RPi because of my motion sensor, using this tutorial as a starting point for motion sensor but want to integrate it to a django view (page)
After downloading the module, uncompress and unpack the downloaded file. Then, run the command "python setup.py install". This documentation on installing modules may be useful http://docs.python.org/2/install/.
As far as using the module with Django, I cannot really help with that. This page may help: https://docs.djangoproject.com/en/dev/intro/reusable-apps/.
I'm Python newbie, Recently, I am working a project on JIRA. I need to access JIRA api to retreive some info about issues. But it always indicates as follows:
WARNING: Couldn't import magic library (is libmagic present?) Autodetection of avatar image content types will not work; for create_avatar methods, specify the 'contentType' parameter explicitly.
And in fact, when I download the magic package with easy_install or pip, it always fail.
And then, I download the libmagic and magic package manually, copy them to the directory C:\Python27\Lib\site-packages, but when executing the clause jira = JIRA(), it still produces the warning as mentioned above
If it is asking for magic and libmagic it means libmagic is not installed, not just the python bindings for it. You need to install that via your package manager from your OS.
Also, if you need help, we can't really help you without tracebacks, so if you're getting errors you need to include those.