问题标签 [conda-forge]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
python - 从通道 conda-forge 导入模块错误
我无法导入已安装在 conda-forge 频道上的某个模块。如您所见,如果我运行该模块就存在
康达清单
在正确的环境下。但是,如果我在同一个 conda 环境中运行 .py 脚本,则找不到该模块。特别是,我无法导入模块“betfairlightweight”。
是不是因为它不在默认的 conda 通道中?如果是这样,我如何从默认通道和 conda-forge 导入模块?
该脚本被简单地称为
(scraper) C:\Users\frasl\betting\betting\spiders\bet python 文件> API_2.py
其中 (scraper) 是安装软件包的 conda 环境。
脚本失败的部分是导入,所以:
进口必发轻量级
ModuleNotFoundError:没有名为“betfairlightweight”的模块
所有仅安装在 conda-forge 通道上的模块在导入时都失败,而所有其他模块,例如 pandas、numpy、json 都可以正常工作。
我正在使用Anaconda Prompt。
编辑:
如果我运行:
(scraper) C:\Users\frasl\betting\betting\spiders\bet python 文件>python API_2.py
然后模块“betfairlightweight”不会给出导入错误,但是,熊猫会:
回溯(最近一次通话最后):
文件“API_2.py”,第 2 行,在
将熊猫导入为 pd
ModuleNotFoundError:没有名为“熊猫”的模块
anaconda - Theano 无法识别 Anaconda 新编译器
我有一个conda
基于以下 yaml 的虚拟环境:
这是一个简化的例子,实际上 YAML 有更多的包。
详细地说,该软件安装在容器base
内的环境docker
中,但我不认为我的问题与容器有关。Dockerfile 的重要部分如下:
该容器已正确构建,之后我可以使用命令运行 Anaconda New Compilers:x86_64-conda_cos6-linux-gnu-gcc
或x86_64-conda_cos6-linux-gnu-c++
. 但是,当我运行一个测试 python 脚本时,import theano
我得到一个错误:
当我稍后检查构建日志时,安装的 theano 版本是:1.0.4
编译器版本是:7.3.0
python - 在 mac 上安装图形工具后,我得到 ValueError: Namespace Gtk not available
我已经在 mac 10.14 上使用这条线安装了图形工具:
但是,当我尝试使用图形工具网站上的示例代码时,我收到了有关 gtk 的错误消息:
我曾尝试使用 Homebrew ( brew install gtk+3
) 安装 gtk3,但它似乎没有帮助,我仍然得到同样的错误。
有人有同样的问题吗?
anaconda - Conda 打包和 C 库作为依赖项
Conda 在控制包的必要依赖项方面做得很好,但显然大多数包都将 C 库排除为可跟踪依赖项。例如,让我们使用以下命令安装 Gnuastro:
然后,我查看了 Gnuastro 的一个程序链接的库(例如astnoisechisel
):
所有使用的高级库都在 Conda 环境中,除了 C 库:libm.so.6
、libc.so.6
、libpthread.so.0
、librt.so.1
、libdl.so.2
和libresolv.so.2
ofcourse ld-linux-x86-64.so.2
。
我在 Conda-forge 上找不到 GNU C 库,但是当我进行搜索时,我发现了其他一些拥有它的项目。所以例如我试过:
这安装了 GNU C 库 2.30(3 个月前创建的 Conda tarball),ldd
上面的命令给了我一个漂亮的列表,其中包含了 Conda 安装中的所有内容。在一个测试 Conda 环境中,调用给astnoisechisel --version
了一个分段错误,而在另一个环境中它成功了。然后我尝试了另一个 Conda C 库(在干净的环境中):
这是旧版本的 C 库(最近一次更新是 5 年前:glibc 2.19)。在这种环境下,我的astnoisechisel --version
命令只会给出分段错误和崩溃。
在这个 conda-forge 讨论中,据说“ glibc 是不好发布的东西,如果我们不能使用系统 glibc,我很担心这个包。它与内核版本紧密相关,并且使用旧版本也是一种安全风险”。所以我想包含 GNU C 库(至少在 GNU/Linux 系统上)不是他们的政策。
我还看到 Anaconda 中的“基本”包存在类似问题。例如,当我检查 or 的链接标志curl
时zstd
。
所以我的问题是:如果 C 库没有被正式定义为依赖项(就像所有其他依赖项一样),那么在不久的将来(比如 5 年),Conda 包(尤其是旧版本的软件)的可靠性如何在上述情况下)?
类似的说明:假设我需要手动获取用于构建 Conda 包的正确 C 库(以便能够运行可执行文件)。用于构建该软件包的 C 库版本是否记录在下载的 tarball 中的任何位置?
python - conda-forge 能否在安装 MKL 版本的软件包时优先于默认值?
记录在案的 Conda “最佳实践”仍然是在文件中赋予conda-forge
通道优先级。我可以继续优先考虑,同时仍然从“默认”频道下载任何优化的包吗?defaults
environment.yml
conda-forge
mkl
我从来没有遇到defaults
过在我的环境文件中优先考虑的任何问题,conda-forge
所以也许这个建议的“最佳实践”不再解决一个真正的问题。
不过,如果有办法mkl
在环境文件中指定conda-forge
优先级高于defaults
.
python - Cython 无法识别 pymalloc Python
我有一个 conda 环境,它在使用 Cython 时出现错误。我无法在不让 bug 消失的情况下减少依赖列表,所以这里是完整的环境:
创建环境:conda env create -f environment.yml
激活它:conda activate test
创建一个文件helloworld.pyx
:
创建一个setup.py
:
Cythonize它:python setup.py build_ext --inplace
使用 导入时python -c "import helloworld"
,会出现以下错误:
它创建了一个文件helloworld.cpython-37-x86_64-linux-gnu.so
,它应该在的位置helloworld.cpython-37m-x86_64-linux-gnu.so
。事实上,如果你重命名它,你可以验证它是否正常工作:
在 conda 环境中m
存在后缀:$CONDA_PREFIX/include/python3.7m
. 我知道这与 Python 是否用 pymalloc 编译有关,但我不明白为什么 Cython 在这种情况下看不到它。
python - 安装scrapy包时如何解决此错误?
在 Anaconda2 中,
我正在尝试scrapy 1.8.0 py-27
使用 Conda 进行安装。
当我运行时:
Conda install scrapy
出现以下错误:
错误 conda.core.link:_execute_actions<337>:安装包 'conda-forge::pkginfo-1.5.0.1-py_0' 时出错
CondaError:无法链接不存在的源。C:\Anaconda2\Scripts\conda.exe
运行“conda clean --packages”可能会解决您的问题。
python - 从 recipe/meta.yaml 中的“关于”部分更新信息
我维护一个 conda-forge 包(spaghetti),我有一个关于从 conda-forge 原料更新 recipe/meta.yaml 中“关于”部分的信息的问题。在 GitHub feedstock 页面上正确更新重新渲染recipe/meta.yaml
后,似乎更新的信息没有被推送到实际的anaconda/conda-forge 站点。有谁知道我可以做些什么来直接控制它?README.md
python - Jupyter and conda: error when cloning environment
I have created multiple conda environments in order to test compatibility of installed packages. I use conda create -n test02 --clone test01
to create environment test02 as a clone of test01. I activate test02, install new packages and start instance of python from which I import new packages with no problem. The problem arises when I launch jupyter notebook or qtconsole and try to import newly installed package and get import error: no module named 'xxx'. I do a sys.executable
and see that jupyter is running python from the old environment (test01) I cloned the new one from. Why is this happening? Can I change it in config file somewhere and where might I find this file?
edit: more info
jupyter --paths
for both environments share path entry for config and data in the same environment directory
edit2: I forgot to mention that I installed Jupyter using pip.
to recreate the problem I did:
config:
C:\Users\Aka.jupyter
c:\users\aka\miniconda3\envs\env1\etc\jupyter
C:\ProgramData\jupyter
data:
C:\Users\Aka\AppData\Roaming\jupyter
c:\users\aka\miniconda3\envs\env1\share\jupyter
C:\ProgramData\jupyter
runtime:
C:\Users\Aka\AppData\Roaming\jupyter\runtime
config:
C:\Users\Aka.jupyter
c:\users\aka\miniconda3\envs\env1\etc\jupyter
C:\ProgramData\jupyter
data:
C:\Users\Aka\AppData\Roaming\jupyter
c:\users\aka\miniconda3\envs\env1\share\jupyter
C:\ProgramData\jupyter
runtime:
C:\Users\Aka\AppData\Roaming\jupyter\runtime
If I were to install jupyter with conda into a brand new environment and then clone the environment, jupyter behaves as expected. Note: I installed jupyter with pip because I am using python 3.5 because of other packages I need and installing jupyter with conda in my environments kept breaking it. I reached out to conda-forge for help but they said "sorry, we don't support python 3.5".
python - 无法使用 conda 安装 cartopy 0.17
由于这个错误修复,我需要将 cartopy 0.16 更新到 0.17 。
bash 命令conda list | grep cartopy
返回:
当我这样做的时候conda update cartopy
我得到:
但随后再次检查,我仍然有 cartopy 0.16。
我也尝试过以下命令:
conda install -c conda-forge cartopy
(只安装 0.16),conda install cartopy=0.17
它带我浏览了一长串以此开头的返回列表:
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: |
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
Examining conflict for conda basemap scipy python mkl_fft twyt...
但它最终不会更新 cartopy。
有人知道我如何使用 conda获得新版本吗?