0

I am trying to install python3-venv ubuntu package but I have this error:

sudo apt-get install python3-venv

The following packages have unmet dependencies:
 python3-venv : Depends: python3.5-venv (>= 3.5.1-2~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

So I tried install python3.5-venv but without any success:

sudo apt-get install python3-venv

The following packages have unmet dependencies:
 python3.5-venv : Depends: python3.5 (= 3.5.1-10) but 3.5.2-2ubuntu0~16.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.

I tried use conda and downgrade my python version from 3.5.2 to 3.5.1 but error is still occurs.

conda install python=3.5.1

My Ubuntu version => Ubuntu 16.04.2 LTS 64-bit

I also tried sudo apt install -f but this didn't solve my problem.

Where can be a problem?

Joozty
  • 131
  • Are you doing some sort of cross-compiling? What's the output of apt-cache policy python3.5-venv? – fkraiem Aug 24 '17 at 11:03
  • Here is the output. I need setup virtual enviroment for my project. python3.5-venv: Installed: (none) Candidate: 3.5.1-10 Version table: 3.5.1-10 500 500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages – Joozty Aug 24 '17 at 11:05

2 Answers2

2

Ok, I finally found solution. I have broken source.list. I regenerate new one here:

https://repogen.simplylinux.ch/

And replace at /etc/apt/

Joozty
  • 131
-1

venv is in the standard modules since Python 3.3 and means you don't have to install it separately.

python3 -m venv my_venv
Timo
  • 4,680
  • 2
    For the record, on at least Ubuntu 16.04 and all versions of Debian as far as I know, you do have to install it separately: they package pieces that it depends on in a default invocation (specifically the ensurepip module) in an external package that isn't installed in by default with the rest of Python 3. – mtraceur Dec 20 '17 at 22:08
  • On Ubuntu 14.04, this is not the case. venv is not available by default. – Kirk Feb 19 '19 at 01:13