24

I am trying to install a package named QSTK for a course that I am doing. The course points to an installation package for the 32 bit version, but I have 64 Python installed. I have found a .egg file listed on the Python packages index.

It seems to have an exe for 32 bit, but just the .egg for 64 bit. I downloaded the QSTK-0.2.6-py2.7.egg version and have been trying to install this unsucessfully so far.

Here is what I have tried:

  1. Using easy install (from the C:\Python27\Lib\site-packages directory):

    Python easy_install -Z C:\Users\Prosserc\Downloads\QSTK-0.2.6-py2.7.egg
    

    this has created a QSTK-0.2.6-py2.7.egg directory in my site-packages directory which I can open and find files in. However, I have tried to import QSTK from the python shell and get the usual "No module named..." import error.

  2. I looked for a setup.py file as I have used these to install packages before, but could not find one.

  3. I have also looked at this thread which gives details of installing a .egg file without using easy install, but cannot figure out what changes I would need to make to the script provided as this is to install a specific package that I already have.

If anyone can help by explaining either how I can install this .egg file correctly or by providing a link to the QSTK modules for python 2.7 64 bit in another format this would be greatly appreciated.

I have managed to install the packages that QSTK is dependant on okay (numpy, scipy, matplotlib, pandas, python-dateutil and scikit-learn).

Community
  • 1
  • 1
ChrisProsser
  • 12,598
  • 6
  • 35
  • 44

5 Answers5

33

You should add -m before easy_install
for example:

python -m easy_install C:\Users\Prosserc\Downloads\QSTK-0.2.6-py2.7.egg
13

How about if you unpack the .egg (it's just a .zip in disguise), then cd into it and run python setup.py install? Will that run fine and will you then be able to import your module?

I'm saying this because if the .egg file does get put under site-packages as appropriate but you're still not able to import, this might be a problem in the code itself.

Erik Kaplun
  • 37,128
  • 15
  • 99
  • 111
  • Thanks for the quick response. Unfortunately, this just gives me the same files that I csan already find in the .egg directory in my site-package, still no setup.py file. I will try an earlier version of the module incase you are right about an error in the code / package. – ChrisProsser Sep 01 '13 at 13:27
  • Still the same problem unfortunately, easy install seems to run okay and creates .egg dir in site-packages, but install does not work. Checked files on this version as well and no setup.py file included. – ChrisProsser Sep 01 '13 at 13:34
  • then you have a package problem – dartdog Sep 01 '13 at 13:45
  • I thought `easy_install` required the existence of a `setup.py`... guess I was wrong then. – Erik Kaplun Sep 01 '13 at 14:04
  • 1
    What does it mean if it is in site-packages but I can't import it? – soandos Sep 15 '14 at 21:34
12

I have finally found another place to download this from with a package that works: https://pypi.python.org/pypi/QSTK/0.2.6 has a QSTK-0.2.6.tar.gz option to build it from the source code.

Unzipping this (then again once down to the .tar), I could find the setup.py file and install by going to the directory with the setup file and running:

python setup.py install
ChrisProsser
  • 12,598
  • 6
  • 35
  • 44
  • 1
    Thank you! I guess that I'm participating the same course, so this comment was very helpful – Eugene Sep 21 '14 at 21:34
0

I tried copying the contents of the .egg folder in the path Lib\site-packages . It worked and didn't throw any ModuleNotFoundError .

Blossom
  • 113
  • 1
  • 8
-1

I found pip install qstk works perfectly for 64x 2.7 python at win 7

new2cpp
  • 3,311
  • 5
  • 28
  • 39