0

I am trying to install a library in a virtualenv instance with pip. The library version I want (wxPython 3.0.2) is not available on PyPi; it is only available for download from SourceForge. Thus, I have the source tarball downloaded on my machine and I am trying to install it in such a way that it will play nicely with virtualenv.

(I am on a Windows computer, running Python 2.7.)

I have tried the following:

  • doing a direct install: pip install wxPython-src-3.0.2.0.tar.bz2
  • extracting the files from the tarball to wxPython-src-3.0.2.0, then installing from the extracted directory: pip install wxPython-src-3.0.2.0
  • extracting the files from the tarball, then navigating into the extracted folder to the nested wxPython directory, which holds the setup.py file, and then installing from there: pip install wxPython

The last attempt seems the most promising, but I get the following traceback:

Processing \wxpython-src-3.0.2.0\wxpython
    Complete output from command python setup.py egg_info:
    Setuptools must be installed to build an egg

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in c:\users\__MY_USERNAME__\appdata\local\temp\pip-req-build-q0pxlt\

This is also strange, because it suggests I don't have setuptools even though I can run pip list and see version 40.6.3 installed.

Any help appreciated.

2 Answers 2

2

Why not install a precompiled version? There are a lot of .exe files at SF. You probably need wxPython3.0-win64-3.0.2.0-py27.exe.

Also take a look at Christoph Gohlke's collection.

If you still insist on installing from sources please bear in mind that wxPython 3 is so old it predates pip. Forget about pip.

First, you need to install wxWidgets as wxPython is just a Python wrapper for wxWidgets C++ library. Extract wxPython-src-3.0.2.0.tar.bz2 and follow instructions in wxPython-src-3.0.2.0/docs/msw/install.txt.

After compiling and installing wxWidgets compile wxPython. See wxPython-src-3.0.2.0/wxPython/docs/BUILD.txt.

Sign up to request clarification or add additional context in comments.

Comments

0

My eventual solution was the easy way out: installing my package (wxPython) locally as @phd suggested, and opting for local package access via either virtualenv --system-site-packages env or deleting the "no-global-site-packages.txt" file in an existing environment folder.

Not what I expected to do, but it works so no complaints.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.