Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I install a .egg Python package on Windows (attempt using easy_install not working)

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).

like image 417
ChrisProsser Avatar asked Sep 01 '13 13:09

ChrisProsser


People also ask

How do I install .EGG files?

Also, the egg file is just a zip, so you could unzip it and then use python setup.py install . unzip setuptools-0.6c11-py2. 7.

How do I set up Setuptools for python on Windows?

Step 1: Download the latest source package of Setuptools for Python3 from here. Step 2: Extract the downloaded package using the given command. Step 3: Go to the setuptools-60.2. 0 folder and enter the following command to install the package.


2 Answers

You should add -m before easy_install
for example:

python -m easy_install C:\Users\Prosserc\Downloads\QSTK-0.2.6-py2.7.egg
like image 149
Ali Asghar Taghizadeh Avatar answered Oct 23 '22 10:10

Ali Asghar Taghizadeh


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.

like image 12
Erik Kaplun Avatar answered Oct 23 '22 11:10

Erik Kaplun