$ sudo pip install bottle
Downloading/unpacking bottle
Downloading bottle-0.10.7.tar.gz (55Kb): 55Kb downloaded
Running setup.py egg_info for package bottle
Installing collected packages: bottle
Found existing installation: bottle 0.10.7
Uninstalling bottle:
Successfully uninstalled bottle
Running setup.py install for bottle
changing mode of build/scripts-2.6/bottle.py from 640 to 755
changing mode of /usr/local/bin/bottle.py to 755
Successfully installed bottle
>>> help('modules')
blahblah
bottle
blahblah
$ ls /usr/local/lib/python2.6/dist-packages/
bottle-0.10.7.egg-info bottle.py bottle.pyc
but
$ python
Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import bottle
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named bottle
wtf??? Ubuntu 10.10
SOLUTION: # chmod -R 775 /usr/local/lib/python2.6/dist-packages/ is help for me. Thanks for all.
It is recommended that you use a virtualenv with python in general but I'd say especially with web development.
What happens when you use a virtualenv?
Because I get this:
Please, check the following documentation on PYTHONHOME and PYTHONPATH:
and check your PYTHONHOME too.
What ended up working for me was:
I am getting this error on Windows Environment.
Please have look into the below:
I know I'm late to the party - but I was having a problem using python command and my bottle.py module being located in my 3.x lib directory.
I just tossed a symlink from bottle.py in my python3.x to my current 2.x directory as such:
Obviously change the version numbers to match your directory structure!