[英]Can't install eth-brownie on Ubuntu
I am trying to install eth-brownie using the documentation, on Ubuntu 20.04.2.我正在尝试使用 Ubuntu 20.04.2 上的文档安装 eth-brownie。 I've been going in circles for hours, trying to do everything the messages are telling me.
我已经转了几个小时,试图做消息告诉我的一切。
pipx install eth-brownie pipx 安装 eth-brownie
gives: Not installing to existing directory '/home/me/.local/pipx/venvs/eth-brownie'.给出:不安装到现有目录'/home/me/.local/pipx/venvs/eth-brownie'。 Pass '--force' to force installation
通过'--force'强制安装
fine, I tried with --force, and then got the following:很好,我尝试了--force,然后得到以下结果:
Installing to existing directory '/home/me/.local/pipx/venvs/eth-brownie' The virtual environment was not created successfully because ensurepip is not available.安装到现有目录 '/home/me/.local/pipx/venvs/eth-brownie' 虚拟环境未成功创建,因为 ensurepip 不可用。 On Debian/Ubuntu systems, you need to install the python3-venv package using the following command.
在 Debian/Ubuntu 系统上,您需要使用以下命令安装 python3-venv package。
apt-get install python3-venv apt-get 安装 python3-venv
I know I already have python3, because when I type python3 I get: Python 3.8.5, blabla我知道我已经有了 python3,因为当我输入 python3 时,我得到:Python 3.8.5,blabla
But ok, let's try doing what it says.但是,好吧,让我们尝试按照它说的去做。 Tried, asked to use sudo.
试过了,要求使用sudo。 Added 'sudo' in the beginning, and got: The following packages have unmet dependencies: python3-venv: Depends: python3.8-venv (>= 3.8.2-1~) but it is not going to be installed E: Unable to correct problems, you have held broken packages.
在开头添加'sudo',得到:以下包具有未满足的依赖关系:python3-venv:依赖:python3.8-venv(> = 3.8.2-1〜)但不会安装E:无法为了纠正问题,您持有破损的包裹。
I searched for similar questions and have been going at it for hours.我搜索了类似的问题,并且已经研究了几个小时。 I tried the 'update' command, 'the 'upgrade' command, the 'dpkg' thing, and every suggestion I could find.
我尝试了“更新”命令、“升级”命令、“dpkg”以及我能找到的每一个建议。 I just want to have eth-brownie.
我只想吃 eth-brownie。 Can someone please help?
有人可以帮忙吗?
I had some errors on Ubuntu too.我在 Ubuntu 上也有一些错误。 But it worked installing Brownie on a virtual environment.
但它可以在虚拟环境中安装 Brownie。
- Install Virtual Env:
安装虚拟环境:
$ pip install virtualenv
- Create a Virtual Env:
创建一个虚拟环境:
$ virtualenv -p python3 .
- Activate the Virtual Env:
激活虚拟环境:
$ source bin/activate
- Then you can run the brownie pipx install command:
然后你可以运行 brownie pipx install 命令:
$ pipx install eth-brownie
It should install, and you can deactivate the virtualenv just typing "deactivate" after.它应该安装,您可以在之后输入“deactivate”来停用 virtualenv。 And you will not need to activate virtual env anymore to run Brownie.
您将不再需要激活虚拟环境来运行 Brownie。
PS: Don't create the virtualenv on the same folder of your brownie project. PS:不要在你的 brownie 项目的同一个文件夹中创建 virtualenv。 If you start a Brownie Project with the "brownie init" command, it will give an error requesting the folder to be empty.
如果您使用“brownie init”命令启动一个 Brownie 项目,它将给出一个错误,要求该文件夹为空。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.