- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我正在尝试通过 Cygwin 让 virtualenv[wrapper]
在我的 Windows 机器上工作。安装成功,连同 easy_install
,基于以下说明:http://www.doughellmann.com/docs/virtualenvwrapper/ .
当我使用mkvirtualenv [name_of_vir_env]
时出现问题。我得到以下输出:
$ mkvirtualenv testenv
New python executable in testenv\Scripts\python.exe
Installing setuptools.................done.
bash: D:\.virtualenvs/testenv/bin/postactivate: No such file or directory
chmod: getting attributes of `D:\\.virtualenvs/testenv/bin/postactivate': No such file or directory
bash: D:\.virtualenvs/testenv/bin/predeactivate: No such file or directory
chmod: getting attributes of `D:\\.virtualenvs/testenv/bin/predeactivate': No such file or directory
bash: D:\.virtualenvs/testenv/bin/postdeactivate: No such file or directory
chmod: getting attributes of `D:\\.virtualenvs/testenv/bin/postdeactivate': No such file or directory
ERROR: Environment 'D:\.virtualenvs/testenv' does not contain an activate script.
在 testenv
目录中,没有 bin
子目录,只有 Lib
和 Scripts
。 Scripts
包含 activate.bat
,它应该用于激活这个特定的环境,但是如果我尝试通过 bash
运行它,我会得到一个错误:
$ ./activate.bat
./activate.bat: line 1: @echo: command not found
./activate.bat: line 4: syntax error near unexpected token `('
./activate.bat: line 4: `if not defined PROMPT ('
我可以退出 bash
并调用 activate.bat
,这会更改为所需的环境。但是如果不在 bash
中,我就不能使用 workon
命令,或者 virtualenvwrapper_bashrc
中的任何其他命令。
如何让两者一起工作,即留在 bash
中,以便我可以使用 virtualenvwrapper_bashrc
中的命令?
最佳答案
我没有使用 virtualenvwrapper 的经验,但确实经常使用 virtualenv。我不认为 activate.bat 旨在在 cygwin 下运行,它在常规 Windows shell 中运行时有效。我想如果你使用的是 cygwin,你可能想要使用更像 bin/activate(类 unix 操作系统的版本)的东西。
bash 中的 cygwin 环境可能与 activate.bat 期望运行的标准环境截然不同,因此找到一个可以与 bash 一起工作的激活脚本(也许从 unix 版本中找到一个副本)可能会让你到达哪里你可以在 bash 中运行你的 virtualenv。
关于python - 如何让 virtualenvwrapper 和 cygwin 合作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2173963/
有什么创意可以在不执行 O/S Thread.Sleep(10) 的情况下通过合作/非抢占式多任务处理来避免 yield 或 sleep 上的死锁?通常 yield 或 sleep 调用将回调到调度程
我在 httpd.conf 中取消注释了以下行: LoadModule php5_module libexec/apache2/libphp5.so 当我转到任何 php 页面时,文件会下载而不是显示
我正在创建一个新的支付应用程序。我有一个客户端应用程序,用户可以选择价格,输入其身份验证信息,然后客户端创建 iso 8583 消息并将此数据发送到银行服务器。 根据我的研究,我可以使用 jPOS 来
我正在尝试这个简单的代码: import java.util.List; import com.orientechnologies.orient.core.exception.OStorageExce
当我去列表时,这将像这样弹出子列表。这是使用 Chrome 和 Opera。但是在火狐浏览器中是这样显示的。 HTML代码 Categories Printing Mate
尝试使用 bc 对数组中的元素求和,我有一个包含名称和其值的文件,如果名称出现 3 次,我应该将其值乘以 3,然后找到所有元素的总和,我看到标准输入错误 $ cat foo.txt max 2.3 h
一般来说,是否有一个接口(interface)表明TransactionScope-awareness?是否有利用 TransactionScope 的常用数据库列表? (它是扩展 DbConnect
我想知道为什么没有确定的方法来处理 Jackson。我只想解析 JSON 字符串: ObjectMapper mapper = new ObjectMapper(); Customer[] myObj
Expo是很棒的。它的目标之一是仅使用 javascript 来编写 React Native 应用程序。 您如何确定第三方 React Native 库是否可以在 Expo 开发环境中工作? 最佳答
我有一个 Rad 组合框和 2 个 RadGrid - grvUser 和 grvRole grvUser RadGrid如下...
我一直在努力 Unsafe JavaScript attempt to access frame with URL http://lolfantasy.net/ from frame with URL
我有这种电子邮件表 id | url | id1 | id2 | mail_date | message 我的行示例 id | url | id1 | id2 | mail_date | messag
我正在尝试弄清楚如何使用委托(delegate)和协议(protocol)。 我有一个 MessageFetcher 类,它从 url 中获取消息。 class MessageFetcher { f
所以我已经尝试了几个星期让 GLFW3 与 MinGW 一起工作(通过 Code::Blocks IDE),但每次都失败了。我在每个 glfw 参数中都得到了一大堆“ undefined refere
当我写这段代码时,我在 Scala 中遇到编译错误 var s: Stack[_ ,这显然是一个错误。 这解释了为什么做 x :: xs不危险。现在来解释为什么它会打字: :: 的签名在 List[
我刚开始一个非常简单的项目,并尝试同时使用 ButterKnife 和 Jack 编译器,但它们似乎不能很好地相互配合。 Gradle插件版本:2.2.0-alpha5 在我的模块 build.gra
我一直在关注本指南(并通过 Composer 安装了所有内容):http://docs.behat.org/cookbook/behat_and_mink.html并试图让 Behat + Mink
我无法让 Google 的 Repo、gerrit 和 Jenkins 一起工作。 我们的设置: 我们有一个由几个 git 存储库构建的 Repo,它们都在我们的 gerrit 服务器上。 list
我使用 iText 库来创建并操作 PDF 文档。让我们有一个包含简单字符串的文档,例如“Hello world”。所以在pdf文件结构中,我们必须有(Hello world)Tj。问题是我如何通过使
我在 Jasper 中为 noto-sans 字体 ( https://www.google.com/get/noto/#sans-lgc ) 创建了一个字体扩展,并将其添加到我的类路径中。我的应用程
我是一名优秀的程序员,十分优秀!