Discussion:
Trouble installing -- is there an egg?
Steven Lehar
2010-09-09 20:55:52 UTC
Permalink
I'm having trouble installing on a Windows 64-bit machine.

Downloaded http://www.lag.net/paramiko/download/paramiko-1.7.6.zip ,
unzipped and ran it, and it installed

...Python25\Lib\site-packages\paramiko-1.7.2\
build\
demos\
dist\
docs\
paramiko\
paramiko.egg-info\
tests\
(and a bunch of other files including setup.py)

One folder, paramiko.egg-info, suggests that there is an .egg file, but I
don't find it. Is there an egg? Should I run easy_install?

I tried this under Cygwin...
cd ...\site--packages\paramiko-1.7.2
python setup.py build
running build
running build_py
python setup.py install
running build
running build_py
running install_lib
running install_egg_info
Removing .../site-packages/paramiko-1.7.2-py2.6.egg-info
Writing .../site-packages/paramiko-1.7.2-py2.6.egg-info

So it looks like everything is installed, and sure enough, when I do...
import paramiko
it imports without error. But if I exit python and start a whole new python
session, then it does NOT work!
import paramiko
...ImportError: No module named paramiko

Can somebody tell me what I am doing wrong?

Steve
Tobias Mueller
2010-09-09 23:03:16 UTC
Permalink
Heya,
Post by Steven Lehar
import paramiko
it imports without error. But if I exit python and start a whole new
python session, then it does NOT work!
import paramiko
...ImportError: No module named paramiko
Can somebody tell me what I am doing wrong?
Sounds like a wrong PYTHONPATH.

Cheers,
Tobi
Steven Lehar
2010-09-10 21:43:53 UTC
Permalink
I found the problem. After the "python setup install" I found the paramiko
folder located at:

Python25\Lib\site-packages\paramiko-1.7.2\build\lib\parmiko\

When I simply copied that final paramiko\ folder to "sys.prefix" (i.e.
C:\\Python25)

Python25\paramiko

then everything worked great! Was that in fact a PYTHONPATH problem? How
do I echo $PYTHONPATH to see what it is? What *should* it be set to? I think
for sure I set it to C:\\Python25 when I originally installed Python. How
should the setup normally know where to install site-packages? Should the
final paramiko\ folder actually be in C:\\Python25, or would it be more
usual to have it located in site-packages?

One thing the on-line Python documentation is not very clear on is how
installation actually works, where the packages are actually installed,
where the source.py and compiled.pyc files actually belong. That would make
it a lot easier to debug installation problems if we knew where to go
looking for them after installation.
Post by Tobias Mueller
Heya,
Post by Steven Lehar
import paramiko
it imports without error. But if I exit python and start a whole new
python session, then it does NOT work!
import paramiko
...ImportError: No module named paramiko
Can somebody tell me what I am doing wrong?
Sounds like a wrong PYTHONPATH.
Cheers,
Tobi
Continue reading on narkive:
Loading...