简体   繁体   English

OS X上的wxPython和virtualenv

[英]wxPython and virtualenv on OS X

Right now Im using OS X Yosemite and trying to install in my virtuaenv few packages via pip : 现在,我使用OS X Yosemite,并尝试通过pip在我的virtuaenv中安装一些软件包:

relrin at MacBook-Relrin in ~ 
=> cd code/Helenae/

relrin at MacBook-Relrin in ~/code/Helenae 
=> source bin/activate

relrin at MacBook-Relrin in ~/code/Helenae workon code 
=> pip install wxPython wxPython-common
Downloading/unpacking wxPython
  Could not find any downloads that satisfy the requirement wxPython
  Some externally hosted files were ignored (use --allow-external wxPython to allow).
Cleaning up...
No distributions at all found for wxPython
Storing debug log for failure in /Users/savicvalera/.pip/pip.log

relrin at MacBook-Relrin in ~/code/Helenae exited 1 workon code 
=> pip install --allow-external wxPython wxPython-common
Downloading/unpacking wxPython-common
  Could not find any downloads that satisfy the requirement wxPython-common
  Some externally hosted files were ignored (use --allow-external wxPython-common to allow).
Cleaning up...
No distributions at all found for wxPython-common
Storing debug log for failure in /Users/savicvalera/.pip/pip.log

Few minutes ago trying install via brew: 几分钟前,尝试通过brew安装:

brew install wxPython

But installed not in virtualenv, installed in the main user directory. 但未安装在virtualenv中,而是安装在主用户目录中。 How can I fix this? 我怎样才能解决这个问题? Cause wxPyWiki doesn't working right now, and i can't look at docs, how to use virtualenv and wxPython. 原因是wxPyWiki现在无法正常工作,我看不到文档以及如何使用virtualenv和wxPython。

Just use this: 只需使用此:

1) Install via brew: 1)通过brew安装:

   brew install python --framework
   brew install wxPython

2) Make virtualenv when you want 2)在需要时制作virtualenv

3) Go to your site-packages directory in your virtualenv and add symbol links: 3)转到您的virtualenv中的site-packages目录,并添加符号链接:

cd <there your path to lib/python2.7/site-packages/ in virtualenv>
ln -s /usr/local/lib/python2.7/site-packages/wx* .

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM