Reputation: 16199
Following the trouble I described here trying to install an older wPython inside a virtualenv, I then downloaded the dmg directly in a browser, and (after needing to right-click on the .pkg), it successfully got installed.
When I open an intepreter, I confirm that I can import wx
.
Yet when I recreate my virtualenv
, activate it, and open its intepreter:
(venv)MacBook-Pro-de-Pyderman:Projet Pyderman$ python
Python 2.6.6 (r266:84374, Aug 31 2010, 11:00:51)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named wx
Is there a step I am missing with respect to being able to import third-party modules within a virtualenv
?
Upvotes: 0
Views: 285
Reputation: 442
You should try creating the virtualenv with the --system-site-packages
option. This will allow you to access the packages installed at system level, like the ones you install from a dmg image.
Upvotes: 1