Search Results

Search found 102 results on 5 pages for 'pythonpath'.

Page 3/5 | < Previous Page | 1 2 3 4 5  | Next Page >

  • redirection problem for my sites.

    - by redirect-p
    I have a site example.com and another one test.example.com. Both have different configuration file. But when I enter url test.example.com it will redirect to example.com. configuration file for example.com <VirtualHost *:80> ServerName example.com ServerAlias www.example.com DirectoryIndex index.html DocumentRoot my-document-path Options -Indexes ErrorDocument 404 /errors/404.html ErrorDocument 403 /errors/404.html <Location "/"> SetHandler python-program PythonHandler django.core.handlers.modpython PythonPath "['path', 'path'] + sys.path" SetEnv DJANGO_SETTINGS_MODULE example.settings PythonInterpreter example PythonAutoReload On PythonDebug On </Location> </VirtualHost>

    Read the article

  • Apache/Django subdomains problem

    - by thomasgg
    Now I have apache configuration which works only with localhost domain (http://localhost/). Alias /media/ "/sciezka/do/instalacji/django/contrib/admin/media/" Alias /site_media/ "/sciezka/do/plikow/site_media/" <Location "/"> SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE settings PythonPath "['/thomas/django_projects/project'] + sys.path" PythonDebug On </Location> <Location "/site_media"> SetHandler none </Location> How can I make it working for some subdomains like pl.localhost or uk.localhost? This subdomains should display the same page what domain (localhost). Second question: It is possible change default localhost address (http://localhost/) to (http://localhost.com/) or (http://www.localhost.com/) or something else?

    Read the article

  • I can't run uwsgi as normal user

    - by atomAltera
    I want to run uwsgi server as www user, but if I write: uwsgi --socket $SOCKET --chmod-socket 666 --pidfile $PIDFILE --daemonize $LOGFILE --chdir $CHDIR --pp $PYTHONPATH --module main --post-buffering 8192 --workers 1 --threads 10 --uid www --gid www A socket creation error occurs: Log: 1 *** Starting uWSGI 1.4.1 (64bit) on [Mon Dec 10 22:15:23 2012] *** 2 compiled with version: 4.4.5 on 17 November 2012 23:31:14 3 os: Linux-2.6.32-5-amd64 #1 SMP Sun Sep 23 10:07:46 UTC 2012 4 nodename: autoblog 5 machine: x86_64 6 clock source: unix 7 pcre jit disabled 8 detected number of CPU cores: 2 9 current working directory: / 10 writing pidfile to /tmp/uwsgi_mysite.pid 11 detected binary path: /usr/local/bin/uwsgi 12 setgid() to 1002 13 set additional group 1004 (files) 14 setuid() to 1002 15 *** WARNING: you are running uWSGI without its master process manager *** 16 your memory page size is 4096 bytes 17 detected max file descriptor number: 1024 18 lock engine: pthread robust mutexes 19 unlink(): Operation not permitted [core/socket.c line 109] 20 bind(): Address already in use [core/socket.c line 141]

    Read the article

  • FCGI & recompiling python code without restarting apache.

    - by Zayatzz
    Hello At one hosting company, they used to run python projects with fcgi. They had set it up so that when i changed django.fcgi file, which put django & my project on pythonpath, my project code was instantly recompiled. Because of that a friend set up hosting for our shared project in his server using fastcgi. It has been set up and the python scripts execute as they should, but what we do not know is, how to set it up so that my project would be recompiled when my setup file has been changed. Alan

    Read the article

  • Python and mod_wsgi path issue

    - by jasonh
    I have an AIX 6.1 system that I've compiled and installed: Apache 2.2.21 (into /usr/local/mercurial) Python 2.7.2 (into /usr/local/bin and /usr/local/lib) mod_wsgi 3.3 (with the AIX fix #1 described here) Mercurial 2.0 (system-wide) However, when Apache starts, I get the following message in error_log: IOError: invalid Python installation: unable to open /usr/local/bin/lib/python2.7/config/Makefile (No such file or directory) See the problem? bin/lib doesn't exist. /usr/local/lib/python2.7/config/Makefile does exist though. However, I can't figure out where it's getting that path from. Here's the environment variables I've got: PYTHONHOME=/usr/local/bin PYTHONPATH=/usr/local/lib/python2.7 LIBPATH="/usr/local/mercurial/lib:$LIBPATH" PATH=/usr/local/bin:/usr/local/lib:$PATH LDR_CNTRL="MAXDATA=0x80000000" AIXTHREAD_SCOPE=S AIXTHREAD_MUTEX_DEBUG=OFF AIXTHREAD_RWLOCK_DEBUG=OFF AIXTHREAD_COND_DEBUG=OFF SPINLOOPTIME=1000 YIELDLOOPTIME=8 MALLOCMULTIHEAP=considersize,heaps:8 I've tried all sorts of combinations with and without PYTHONHOME, PYTHONLIB and PATH in envvars. My PATH, in case it matters is: /usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/opt/ifor/bin:/usr/local/bin:.

    Read the article

  • Why does python easy install give me "permission denied" errors?

    - by Golden Sinha
    When i try to install program in ubuntu 12.04 it shows the error. program 1 : home@home-Compaq-610:~/Desktop$ python setup.py install running install running build running build_py creating build creating build/lib.linux-i686-2.7 copying Calculator.py - build/lib.linux-i686-2.7 running install_lib copying build/lib.linux-i686-2.7/Calculator.py - /usr/local/lib/python2.7/dist-packages error: /usr/local/lib/python2.7/dist-packages/Calculator.py: Permission denied . program 2 : home@home-Compaq-610:~/Desktop$ sudo chmod +x Moto.bin [sudo] password for home: home@home-Compaq-610:~/Desktop$ it shows like this but it do not install the program. program 3 : home@home-Compaq-610:~/Desktop$ python setup.py install [ERROR] wxPython2.8 is required. how to install wxPython2.8 please tell. if i try to install this program using easy_install it shows like this. home@home-Compaq-610:~/Desktop$ easy_install editra error: can't create or remove files in install directory The following error occurred while trying to add or remove files in the installation directory: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/test-easy-install-6778.pth' The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was: /usr/local/lib/python2.7/dist-packages/ Perhaps your account does not have write access to this directory? If the installation directory is a system-owned directory, you may need to sign in as the administrator or "root" account. If you do not have administrative access to this machine, you may wish to choose a different installation directory, preferably one that is listed in your PYTHONPATH environment variable. For information on other options, you may wish to consult the documentation at: http://packages.python.org/distribute/easy_install.html Please make the appropriate changes for your system and try again. home@home-Compaq-610:~/Desktop$ please help me . please tell how to install programs..

    Read the article

  • Why do I get "permission denied" errors with Python easy_install?

    - by ATMathew
    I'm an Ubuntu newbie and have been trying to install python's easy_install so that I don't have to deal with source files when install Python libraries. I"ve ran the following, and it seems to install the correct applications: sudo apt-get install python-setuptools However, when i run easy_install sqlalchemy or easy_install pysqlite3, it doesn't work. I get the following error message: install_dir /usr/local/lib/python2.6/dist-packages/ error: can't create or remove files in install directory The following error occurred while trying to add or remove files in the installation directory: [Errno 13] Permission denied: '/usr/local/lib/python2.6/dist-packages/test-easy-install-1674.pth' The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was: /usr/local/lib/python2.6/dist-packages/ Perhaps your account does not have write access to this directory? If the installation directory is a system-owned directory, you may need to sign in as the administrator or "root" account. If you do not have administrative access to this machine, you may wish to choose a different installation directory, preferably one that is listed in your PYTHONPATH environment variable. For information on other options, you may wish to consult the documentation at: http://packages.python.org/distribute/easy_install.html Please make the appropriate changes for your system and try again. Help! Abraham

    Read the article

  • Sphinx Error Unknow directive type "automodule" or "autoclass"

    - by user1130381
    I need document my python project using Sphinx. But I can't use autodoc. When I config my project I select the option "extension autodoc", but now if I use .. autoclass:: Class, I have a ERROR: ERROR: Unknown directive type "autoclass" I configure the PYTHONPATH, and now it's good. But I already have this problem. My index file is: .. ATOM documentation master file, created by sphinx-quickstart on Thu Nov 22 15:24:42 2012. You can adapt this file completely to your liking, but it should at least contain the root toctree directive. Welcome to ATOM's documentation! Contents: .. toctree:: :maxdepth: 2 .. automodule:: atom Indices and tables :ref:genindex :ref:modindex :ref:search Thank you, I need that someone say me how I find the problem, or how i can fix this! Sorry for my English, I start now to learn English.

    Read the article

  • Django/Mod_WSGI error: UnboundLocalError: local variable 'resolver' referenced before assignment

    - by ycseattle
    Hello, I've setup the Django with mod_wsgi and run into this error. I thought maybe the sys.path was not setup correctly but I tried everything I could think of with no luck. Any suggestions? The following is the apache2 log for the error: mod_wsgi (pid=2579): Exception occurred processing WSGI script '/home/myapp/myapp.wsgi'. Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/wsgi.py", line 241, in __call__ response = self.get_response(request) File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py", line 142, in get_response return self.handle_uncaught_exception(request, resolver, exc_info) UnboundLocalError: local variable 'resolver' referenced before assignment The following is the content in the myapp.wsgi: import os import sys # put the Django project on sys.path sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "../"))) os.environ["DJANGO_SETTINGS_MODULE"] = "photopier.settings" #os.environ["PYTHONPATH"]="/home" from django.core.handlers.wsgi import WSGIHandler application = WSGIHandler()

    Read the article

  • Django cannot find my templatetags, even though it's in INSTALLED_APPS and has a __init__.py

    - by Vivian Short
    I just installed django-compress (http://code.google.com/p/django-compress) into /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/compress. I added 'compress' to INSTALLED_APPS. In my template file, I wrote {% load compressed %}. I got the error: 'compressed' is not a valid tag library: Could not load template library from django.templatetags.compressed, No module named compressed I verified that there is an init.py in compress, as well as in compress/templatetags/. I tried putting the compress directory into PYTHONPATH. I ran python and wrote "import compress" and that worked. Your suggestions would be very appreciated! What else can I try?

    Read the article

  • Apache/Django subdomains problem

    - by Thomas
    Now I have apache configuration which works only with localhost domain (http://localhost/). Alias /media/ "/sciezka/do/instalacji/django/contrib/admin/media/" Alias /site_media/ "/sciezka/do/plikow/site_media/" <Location "/"> SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE settings PythonPath "['/thomas/django_projects/project'] + sys.path" PythonDebug On </Location> <Location "/site_media"> SetHandler none </Location> How can I make it working for some subdomains like pl.localhost or uk.localhost? This subdomains should display the same page what domain (localhost). Second question: It is possible change default localhost address (http://localhost/) to (http://localhost.com/) or (http://www.localhost.com/) or something else?

    Read the article

  • Apache/Django subdomains problem

    - by Thomas
    Now I have apache configuration which works only with localhost domain (http://localhost/). Alias /media/ "/sciezka/do/instalacji/django/contrib/admin/media/" Alias /site_media/ "/sciezka/do/plikow/site_media/" <Location "/"> SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE settings PythonPath "['/thomas/django_projects/project'] + sys.path" PythonDebug On </Location> <Location "/site_media"> SetHandler none </Location> How can I make it working for some subdomains like pl.localhost or uk.localhost? This subdomains should display the same page what domain (localhost). Second question: It is possible change default localhost address (http://localhost/) to (http://localhost.com/) or (http://www.localhost.com/) or something else?

    Read the article

  • apache virtual host to work with django

    - by khelll
    My project is under: /home/projects/testing and I'm adding this to the buttom of my /etc/httpd/conf/httpd.conf file on Centos machine, but that is not working, <Location "/testing/"> SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE testing.settings PythonOption django.root /testing PythonDebug On PythonPath "['/home/projects/'] + sys.path" </Location> but when requesting http://localhost/testing/jobs for example, I get: Mod_python error: "PythonHandler django.core.handlers.modpython" Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch result = object(req) ............. File "/usr/lib/python2.4/site-packages/Django-1.1.1-py2.4.egg/django/conf/__init__.py", line 75, in __init__ raise ImportError, "Could not import settings '%s' (Is it on sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE, e) ImportError: Could not import settings 'testing.settings' (Is it on sys.path? Does it have syntax errors?): No module named testing.settings

    Read the article

  • django urls.py regex isn't working

    - by Phil
    This is for Django 1.2.5 and Python 2.7 on Wamp Server running apache version 2.2.17. My problem is that the my URLConf in urls.py isn't redirecting, it's just throwing a 404 error. urls.py: from django.conf.urls.defaults import * # Uncomment the next two lines to enable the admin: #from django.contrib import admin #admin.autodiscover() urlpatterns = patterns('', (r'^app/$', include('app.views.index')), # Uncomment the admin/doc line below to enable admin documentation: #(r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: #(r'^admin/', include(admin.site.urls)), ) views.py from django.http import HttpResponse def index(request): return HttpResponse("Hello World") I'm getting the following error: ImportError at /app/ No module named index I'm stumped as I'm only learning Django, can anybody see something wrong with my code? Here's my PythonPath: ['C:\Windows\system32\python27.zip', 'C:\Python27\Lib', 'C:\Python27\DLLs', 'C:\Python27\Lib\lib-tk', 'C:\wamp\bin\apache\Apache2.2.17', 'C:\wamp\bin\apache\apache2.2.17\bin', 'C:\Python27', 'C:\Python27\lib\site-packages', 'c:\wamp\www\seetwo']

    Read the article

  • Can I use Sikuli as an Jython library in my project?

    - by Yinan
    Sikuli is really cool, but it's working in its buildin Jython environment, the Sikuli IDE. So I m wondering is it possible to import Sikuli as an external library to my Jython library? I saw from Sikuli's website that they have this Python module which provides all Sikuli actions like click and type. Here is the link: http://sikuli.org/documentation.shtml#doc/pythondoc-python.edu.mit.csail.uid.Sikuli.html I have tried importing the skiuli-script.jar and add the skiuli-script/Lib to the PYTHONPATH. Then in my spike.py script, I try to do this: import python.edu.mit.csail.uid.Sikuli capture() #enter to screen capture mode then when execute the script, I got this error: java.lang.UnsatisfiedLinkError: java.lang.UnsatisfiedLinkError: /eclipse_3.4.2/workspace/Jython/src/tmplib/libVDictProxy.jnilib: no suitable image found. Did find: /eclipse_3.4.2/workspace/Jython/src/tmplib/libVDictProxy.jnilib: no matching architecture in universal wrapper I m using Jython 2.2.1 and Mac 10.6.2 (32-bit mode). I have also set to use 32-bit mode first in Java Preference.

    Read the article

  • Python analog of Unix 'which'

    - by bgbg
    In *nix systems one can use which to find out the full path to a command. For example: $ which python /usr/bin/python or whereis to show all possible locations for a given command $ whereis python python: /bin/python.exe /bin/python2.5-config /usr/bin/python.exe /usr/bin/python2.5-config /lib/python2.4 /lib/python2.5 /usr/lib/python2.4 /usr/lib/python2.5 /usr/include/python2.4 /usr/include/python2.5 /usr/share/man/man1/python.1 Is there an easy way to find out the location of a module in the PYTHONPATH. Something like: >>> which (sys) 'c:\\Python25\Lib\site-packages'

    Read the article

  • To keep my own versioned app or not.

    - by Esteban Feldman
    Hi all. I need some opinions here. I'm working on a Django project using buildout to get the dependencies, etc... I use mercurial as DVCS. Now... I need to customize one of the dependencies, so I can do one of the following: (* The changes may not be useful for everyone else.) 1- Do a fork of the project in (github, bitbucket, etc...) maintain my version, and get the dependency with (mercurial or git) recipe. 2- Clone the project, put it in the PYTHONPATH, erase DVCS dirs and add it to my projects version. So every change will be private. Here I need to erase all the info from their DVCS or something. Any other you can think of. I'm missing something? I'm too off? Thanks!

    Read the article

  • Google App Engine - Help with running python shell comands from aptanna studio

    - by spidee
    Hi I'm somewhat of a newbie to python and I'm using app engine and aptanna studio - I need to run some python shell commands so that i can complete the tasks in this Tutorial on how to set up 118 and django. I have got this all working but i don't understand how i run the python commands to compile the dictionarys such as $ PYTHONPATH=/path/to/googleappengine/python/lib/django/ /path/to/googleappengine/python/lib/django/django/bin/make-messages.py -a To be honest - why am i saying that! I dont know where in aptanna studio i run this command -then worse I don't quite understand what exactly i type based on the above command line. My path to google app engine is D:\Program Files\Google\google_appengine\ Can anyone help shed some light on how i do this from aptanna / the root of my project?? Im following this Tutorial: http://makeyjl.blogspot.com/2009/02/using-djangos-i18n-in-google-app-engine.html

    Read the article

  • Python Library installation

    - by MacPython
    Hi everybody I have two questions regarding python libraries: I would like to know if there is something like a "super" python library which lets me install ALL or at least all scientific useful python libraries, which I can install once and then I have all I need. There is a number of annoying problems when installing different libraries (pythonpath, cant import because it is not installed BUT it is installed). Is there any good documentation about common installation errors and how to avoid them. If there is no total solution I would be interested in numpy, scipy, matplotlib, PIL Thanks a lot for the attention and help Best Z

    Read the article

  • Embedding Python in C: Having problems importin local modules

    - by Drew
    I'm needing to run Python scripts within a C-based app. I am able to import standard modules from the Python libraries i.e.: PyRun_SimpleString("import sys") But when I try to import a local module 'can' PyRun_SimpleString("import can") returns the error msg: Traceback (most recent call last): File "", line 1, in ImportError: No module named can When I type the command "import can" in iPython, the system is able to find it. How can I link my app with can? I've tried setting PYTHONPATH to my working directory. Thanks.

    Read the article

  • nightmare with relative imports, how does pep 366 work?

    - by pygabriel
    I have a "canonical file structure" like that (I'm giving sensible names to ease the reading): mainpack/ __main__.py __init__.py - helpers/ __init__.py path.py - network/ __init__.py clientlib.py server.py - gui/ __init__.py mainwindow.py controllers.py In this structure, for example modules contained in each package may want to access the helpers utilities through relative imports in something like: # network/clientlib.py from ..helpers.path import create_dir The program is runned "as a script" using the __main__.py file in this way: python mainpack/ Trying to follow the PEP 366 I've put in __main__.py these lines: ___package___ = "mainpack" from .network.clientlib import helloclient But when running: $ python mainpack Traceback (most recent call last): File "/usr/lib/python2.6/runpy.py", line 122, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib/python2.6/runpy.py", line 34, in _run_code exec code in run_globals File "path/mainpack/__main__.py", line 2, in <module> from .network.clientlib import helloclient SystemError: Parent module 'mainpack' not loaded, cannot perform relative import What's wrong? What is the correct way to handle and effectively use relative imports? I've tried also to add the current directory to the PYTHONPATH, nothing changes.

    Read the article

  • On Mac OS X, do you use the shipped python or your own?

    - by The MYYN
    On Tiger, I used a custom python installation to evaluate newer versions and I did not have any problems with that*. Now Snow Leopard is a little more up-to-date and by default ships with $ ls /System/Library/Frameworks/Python.framework/Versions/ 2.3 2.5 2.6 @Current What could be considered best practice? Using the python shipped with Mac OS X or a custom compiled version in, say $HOME. Are there any advantages/disadvantages using the one option over the other? My setup was fairly simple so far and looked like this: Custom compiled Python in $HOME and a $PATH that would look into $HOME/bin first, and subsequently would use my private Python version. Also $PYTHONPATH pointed to this local installation. This way, I did not need to sudo–install packages - virtualenv took care of the rest.

    Read the article

  • Utilizing multiple python projects

    - by Marcin Cylke
    Hi I have a python app, that I'm developing. There is a need to use another library, that resides in different directory. The file layout looks like this: dir X has two project dirs: current-project xLibrary I'd like to use xLibrary in currentProject. I've been trying writting code as if all the sources resided in the same directory and calling my projects main script with: PYTHONPATH=.:../xLibrary ./current-project.py but this does not work. I'd like to use its code base without installing the library globaly or copying it to my project's directory. Is it possible? Or if not, how should I deal with this problem.

    Read the article

  • compiling QGIS Plugin using make

    - by user1675014
    On a fresh mac os x 10.8 install, i've Quantum GIS Installed from Kingchaos binaries and running fine. I'm trying to develop a plugin for QGIS, and using Plugin Builder. The skel that Plugin Builder, produces, should work off-the-shelf, but it does not compile using the makefile. Somewhere python can't find (pyuic.py), and it searches for (/Users/kyngchaos/...), path. This user does not exist on my system:( Here are my ENVS on .profile: export PATH=/Library/Frameworks/GDAL.framework/Programs:$PATH export PYTHONPATH=/Applications/QGIS.app/Contents/Resources/python export DYLD_LIBRARY_PATH="/Applications/QGIS.app/Contents/MacOS/lib:/Applications/Qgis.app/Contents/Frameworks" export PATH="/Applications/QGIS.app/Contents/MacOS/bin:$PATH" Here is the ouptput of make: Arthur@teste:make pyuic4 -o ui_teste.py ui_teste.ui /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file '/Users/kyngchaos/Applications/qgis-python27/Applications/QGIS.app/Contents/MacOS/../Resources/python/PyQt4/uic/pyuic.py': [Errno 2] No such file or directory make: *** [ui_teste.py] Error 2 thanks for reading.

    Read the article

  • uWSGI log file...permission denied to read file

    - by bkev
    I have a server running Django/Nginx/uWSGI with uWSGI in emperor mode, and the error log for it (the vassal-level error log, not the emperor-level log) has a continual permissions error every time it spawns a new worker, like so: Tue Jun 26 19:34:55 2012 - Respawned uWSGI worker 2 (new pid: 9334) Error opening file for reading: Permission denied Problem is, I don't know what file it's having trouble opening; it's not the log file, obviously, since I'm looking at it and it's writing to that without issue. Any way to find out? I'm running the apt-get version of uWSGI 1.0.3-debian through Upstart on Ubuntu 12.04. The site is working successfully, aside from what seems like a memory leak...hence my looking at the log file. My Upstart conf file description "uWSGI" start on runlevel [2345] stop on runlevel [06] respawn env UWSGI=/usr/bin/uwsgi env LOGTO=/var/log/uwsgi/emperor.log exec $UWSGI \ --master \ --emperor /etc/uwsgi/vassals \ --die-on-term \ --auto-procname \ --no-orphans \ --logto $LOGTO \ --logdate My Vassal ini file: [uwsgi] # Variables base = /srv/env/mysiteenv # Generic Config uid = uwsgi gid = uwsgi socket = 127.0.0.1:5050 master = true processes = 2 reload-on-as = 128 harakiri = 60 harakiri-verbose = true auto-procname = true plugins = http,python cache = 2000 home = %(base) pythonpath = %(base)/mysite module = wsgi logto = /srv/log/mysite/uwsgi_error.log logdate = true

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >