简体   繁体   中英

Can't install eth-brownie on Ubuntu

I am trying to install eth-brownie using the documentation, on Ubuntu 20.04.2. I've been going in circles for hours, trying to do everything the messages are telling me.

  1. pipx install eth-brownie

    gives: Not installing to existing directory '/home/me/.local/pipx/venvs/eth-brownie'. Pass '--force' to force installation

  2. fine, I tried with --force, and then got the following:

    Installing to existing directory '/home/me/.local/pipx/venvs/eth-brownie' The virtual environment was not created successfully because ensurepip is not available. On Debian/Ubuntu systems, you need to install the python3-venv package using the following command.

    apt-get install python3-venv

  3. I know I already have python3, because when I type python3 I get: Python 3.8.5, blabla

    But ok, let's try doing what it says. Tried, asked to use 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.

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. I just want to have eth-brownie. Can someone please help?

I had some errors on Ubuntu too. But it worked installing Brownie on a virtual environment.

  1. Install Virtual Env:
$ pip install virtualenv
  1. Create a Virtual Env:
$ virtualenv -p python3 .
  1. Activate the Virtual Env:
$ source bin/activate
  1. Then you can run the brownie pipx install command:
$ pipx install eth-brownie

It should install, and you can deactivate the virtualenv just typing "deactivate" after. And you will not need to activate virtual env anymore to run Brownie.

PS: Don't create the virtualenv on the same folder of your brownie project. If you start a Brownie Project with the "brownie init" command, it will give an error requesting the folder to be empty.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM