python - pybrain install in env but No module named 'pybrain'
问题描述
I'm new to python and Anaconda
I have python 3.8 in my (base) env, and i need pybrain, so since it's not compatible with my current version of python, i created a new env(first i tried all of it with python 3.5, didn't work, so i tried 2.7, same result):
conda create --name py27 python=2.7
then activated it:
conda activate py27
and installed pybrain there:
conda install -c mq pybrain
I checked that it has been installed successfully with:
conda list
pybrain 0.3.3 py27_0 mq
after launching jupyter notebook from same terminal, with (py27) as the 'header'?? of my command line, it opened successfully, i even checked that currently it's opened in expected environment, by typing in a cell:
!conda info
and as i expected, saw the line
active environment : py27
but also, which i guess is importnant:
python version : 3.8.3.final.0
though i am confused with ouput of:
!python --version
cause it's:
Python 2.7.18 :: Anaconda, Inc.
So when i open my notebook i type
import pybrain
and i get:
No module named 'pybrain'
Please point me in direction: what i'm doing wrong? Also it is my first virtual env(distinct from the (base) one), so i probably missing some important concepts.
解决方案
幸运的是,我找到了将 pybrain 与 python3 一起使用的解决方案——我刚刚从源代码下载了它!pip install https://github.com/pybrain/pybrain/archive/0.3.3.zip
,它可以在 python 3.8 中使用
推荐阅读
- python-3.x - CNN 在视频帧中进行预测的问题
- multidimensional-array - Julia:将一维 Julia 函数应用于多维数组
- kubernetes - 我有 2 个调用相同配置的自定义覆盖。我需要在同一个文件夹中有两个 kustomization.yaml 文件
- java - 如何使用域名访问 azkaban 网页界面?
- c# - 是否有 .NET 标准等效的 ValidationProblemDetails 供客户使用?
- javascript - 如果有重复,则在下拉列表中仅显示一个值
- swift - Vapor 4/Swift:中间件开发
- c# - 如何在没有默认 DLL 文件的情况下编译 C# Visual Studio 项目?
- java - OpenJDK 的局部变量类型推断样式指南的检查样式规则
- php - 在 laravel 问题中注册时分配用户角色