- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
简短版本:如何让 PyQt4 的 configure.py 使用安装在虚拟环境中的 SIP 版本?
长版:我知道这个问题的变体在这里被问过一百万次,但我似乎找不到答案。我正在尝试在虚拟环境 (VE) 中安装 SIP 和 PyQt4。我无法将它安装到主系统,因为它是一台工作计算机。我们有一个旧版本的 PyQt,所以我不能只从站点包中复制。
我已经在我的 VE 中安装了 SIP(configure.py --incdir,make,make install)但是当我在 PyQt4 上运行 configure 时我收到错误:错误:此版本的 PyQt 需要 SIP v4.19.0 或更高版本.我安装了 4.19.2 版。当运行 sipconfig 时,它告诉我它仍在使用系统版本,即使 VE 已激活。我如何告诉 PyQt 的 configure.py 使用安装在 VE 中的包?
谢谢大家!
编辑:从外观上看,我的 VE 似乎没有从正确的位置拉取 python 库,即使 VE 已激活。我添加了一行以激活将站点包和 bin 目录附加到 pythonpath 的路径和站点包,但没有成功。它仍然没有找到正确的库。
最佳答案
在您的虚拟环境中安装 pip。并使用 which pip
检查 pip 是否使用了正确的目录.如果它没有使用正确的目录,试试这个:
pip install --target=<location of site packages of your pip in your virtual env> sip==4.19
如果你得到一个名为 permission denied 的错误,使用
sudo chown -R your_username:your_username path/to/virtuaelenv/
然后做:
pip install PyQt4
如果以上方法均无效,请按照以下说明操作:
关于python - VirtualEnv 没有正确设置路径,无法使用已安装的模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43354155/
我有一个相对较大的项目,有很多依赖项,我想分发这个项目,但是安装这些依赖项有点痛苦,并且需要很长时间(pip install 需要相当长的时间)。所以我想知道是否有可能将整个 virtualenv 迁
我有一个 heroku 项目,我想与其他人分享。作为the instructions describe ,我使用 virtualenv 来管理环境和依赖项。有没有办法在新机器上从 requiremen
当我被迫更改我的项目目录名称时,我遇到了一个问题。 首先 Virtualenvwrapper 没有看到我的项目,所以我将 WORKON_HOME 的环境变量更改为新的项目目录。然后我可以激活我的环境。
你可以cd到YOUR_ENV/lib/pythonxx/site-packages/看看,但是有什么方便的方法吗? pip freeze 列出所有已安装的软件包,包括系统环境的软件包。 最佳答案 您可
我想使用 tox 在需要额外设置的项目上运行 py.test 除了将包安装到 virtualenv 之外。创建 virtualenv 并安装依赖项后,需要运行一些命令。 具体来说,我说的是使用 nod
背景:我正在 Mac OS High Sierra 上开发 Flaskr Web 项目。 正处于安装 Flask 阶段,我在安装 virtualenv 时遇到了问题: http://flask.poc
我在我的 ubuntu 电脑上制作了我的 virtualenv。我在那里开发了我的项目。 但我需要 move 我的环境,因为它包含所有包。因为目标机器无法通过网络连接到外部。我必须通过 USB mov
我在激活 virtualenv 时遇到问题。我在服务器上工作并使用 SSH 安全外壳。 我的最终目标是激活 virtualenv 并运行最新版本的 tensorflow 命令行如下: jeonguyo
我的 ~/Documents 中有一堆项目.我几乎只在 python 中工作,所以这些基本上都是 python 项目。每一个,例如~/Documents/foo有自己的 virtualenv,~/Do
我有 --no-site-packages 的 virtualenv选项。我在里面使用了scrapy。 Scrapy 通过 import libxml2 使用 libxml2 .如何使用 pip 在
在 virtualenvwrapper 中,有没有一种简单的方法可以列出我的计算机上的所有 virtualenv? (就像 yolk -l 那样列出当前虚拟环境中的所有 python 包?) 澄清:
本页命令行指令 https://github.com/plumi/plumi.app/blob/master/docs/INSTALL.rst 是“虚拟环境”。 即空格后有句号。 我找不到以这种方式在
我们可以创建一个 virtualenv 吗?从现有的 virtualenv 继承已安装的库? 详细说明: 我首先创建一个“引用”virtualenv,并添加库(固定版本): virtualenv re
我正在使用 sphinx记录我的软件。我正在使用 virtualenv用于安装。现在有些包只安装在虚拟环境中,sphinx 看不到。 我的 conf.py 中有此代码: # If extensions
这个问题在这里已经有了答案: Can existing virtualenv be upgraded gracefully? (5 个回答) 2年前关闭。 我已经使用 python 3.6 创建了一个
这看起来应该很简单: tasks: - name: install python packages pip: name=${item} virtualenv=~/buildbot-env wi
我已经看到了一些针对此问题的修复,但没有一个对我有用,但我认为是我的 virtualenvs 损坏了。我刚刚从 12.04 升级到 14.04,现在我所有的金字塔应用程序都不再工作了。 当我运行 ..
假设我有以下设置: mkdir test && cd test virtualenv .venv source .venv/bin/activate pip install django mkdir
我从 Github 帐户克隆了我的 Django 项目,并使用著名的命令 source nameofenv/bin/activate 激活了 virtualenv当我运行 python manage.
不久前我用 uwsgi/nginx 设置了一个 flask 站点,并设置了一个 virtualenv .. 我忘记了我设置的 venv 的名称,我找不到任何方法在当前目录中列出 virtualenv
我是一名优秀的程序员,十分优秀!