Hi,
I didn't want to install python modules using easy install, symlinks in site-packages or PYTHONPATH.
So, I am trying something that I do wants system wide, then any application installation is done locally. Note, the root password is required only once here.
First create a symblink of.../pythonX.Y/site-packages/mymodules -> /home/...
How do I find out which directories are listed in my system’s PYTHONPATH variable, from within a Python script (or the interactive shell)?
...
I had always assumed that the first entry in sys.path by default was the current working directory. But as it turns out, on my system the first entry is the path on which the script resides. So if I'm executing a script that's in /usr/bin from /some/directory, the first entry in sys.path is /usr/bin. Is something misconfigured on my s...
Hello,
When trying to launch Mercurial(hg) after a restart in my Ubuntu 9.10 Linux Box I got following message:
abort: couldn't find mercurial libraries in [/usr/bin /usr/local/lib/python2.6/dist-packages/vipy-0.4-py2.6.egg /usr/local/lib/python2.6/dist-packages/nose-0.11.1-py2.6.egg /usr/local/lib/python2.6/dist-packages/rope-0....
I'm installing Django on Bluehost and one of the steps to install it was to install flup on their server. I did so and everything works great when I'm logged in via the SSH. However when I actually hit the page in my browser it can't find flup. I get this error in the server log:
ERROR: No module named flup. Unable to load the flup p...
Another developer and I disagree about whether PYTHONPATH or sys.path should be used to allow Python to find a Python package in a user (e.g., development) directory.
We have a Python project with a typical directory structure:
Project
setup.py
package
__init__.py
lib.py
script.py
In script.py, we need...
I'm running PyLint from inside Wing IDE on Windows. I have a sub-directory (package) in my project and inside the package I import a module from the top level, ie.
__init__.py
myapp.py
one.py
subdir\
__init__.py
two.py
Inside two.py I have import one and this works fine at runtime, because the top-level directory (from which m...
Hi there!
I have a TG 1.0 application (not 1.1 -- I'm not sure I can convince the admin to upgrade) running. I have my own checkout of the project from cvs that I'm developing with, and it's come time to integrate xlwt (http://www.python-excel.org/) into the web app.
However, I don't have administrator access and it's not easy to get ...
I'm really confused by some errors I'm getting as I'm trying to put an App into production. Everything works fine on the development machine, but I can't syncdb or enter the Django shell on the Production server.
I'm getting an error when forum.models.py is attempts to import forum.managers.py because the models aren't in the namespace y...
I'd like to use the nltk toolkit on my machine which runs Ubuntu 9.04. I installed python 2.6.4 and several additional packages (numpy, scipy, matplotlib and of course nltk). I can import nltk, but calling a few methods gives various error masseges, all contain "please install Tkinter library".
Googling around I discovered from http://wi...
I have 2 hard-drives, C:\ and D:\
Django imports correctly (which is in my C drive), but my application is on my D drive. I can't move it to the C drive because of some back-up software I'm running/
I'm trying to get auto-complete to work in Komodo Edit 5 which works fine for Django, but not for my application. There are a few other re...
I just rented a VPS from Linode, it has python2.5 and ubuntu 8.04
When I ho to python shell
python
import urllib
I get
ImportError: No module named urllib
What can be the reason? How can I add this module to python? Isn't it prepackaged with the basic version?
Can it be pythonpath problem? How I can test pythonpath?
...
I installed PyScript to try it out but it just wont start. It only gives me the error:
"Error126: Could not open Dll "python26.dll" followed by:
"Python could not be properly initialized. We must quit."
I think this may have something to do with the PYTHONPATH but since I'm a newbie and dont know what it is or exactly what to put in the...
My Django project is placed in /www/host1/htdocs/my/project, www and my are links to other actual folders. Apache has mod_python enabled. I have a .htaccess in project folder:
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE project.settings
PythonDebug On
PythonOption django.root ...
I added this line to my .bashrc (Ubuntu 9.10):
export PYTHONPATH=/opt/google_appengine/
And then I ran the dev_appserver through python2.5 on Ubuntu like this:
$ python2.5 dev_appserver.py guestbook/
python2.5: can't open file 'dev_appserver.py': [Errno 2] No such file or directory
As you can see, it can't find dev_appserver.py eve...
I know it is probably not necessary to paste the whole path, but just for the record I have done so below. Whenever I run a python command, it takes a long time to load this path I suppose. I have checked in .bash_profile and only have these two lines:
export PATH=/Users/username/bin:/opt/local/Library/Frameworks/Python.framework/Versio...
I have a custom module in one of the directories in my PYTHONPATH with the same name as one of the standard library modules, so that when I import module_name, that module gets loaded. If I want to use the original standard library module, is there any way to force Python to import from the standard library rather than from the PYTHONPAT...
Here are some various Python packages my company "foo.com" uses:
com.foo.bar.web
com.foo.bar.lib
com.foo.zig.web
com.foo.zig.lib
com.foo.zig.lib.lib1
com.foo.zig.lib.lib2
Here's the traditional way to store the source on disk:
pysrc/
com/
foo/
bar/
web/
lib/
zig/
web/
lib/
l...
I have a PHP script that call a python script (someone else I can't edit). This work fine on CLI but once I run it as CGI it fails with the error "bzr: ERROR: Couldn't import bzrlib and dependencies."
I guessed it has anything to do with PYTHONPATH so I echo it out and found that it was empty when in apache environment.
I try setting i...
Consider the following file\directory structure:
project\
| django_project\
| | __init__.py
| | django_app1\
| | | __init__.py
| | | utils\
| | | | __init__.py
| | | | bar1.py
| | | | ...
| | | ...
| | django_app2\
| | | __init__.py
| | | bar2.py
| | | ...
| | ...
| scripts\
| | __init__.py
| |...