Installing libboost-python-dev for python3 without installing python2.7
up vote
5
down vote
favorite
I am trying to install boost bindings for python3 on Ubuntu Xenial, but it pulls in whole python2.7 dependency tree. I do not want or need python2.7 on my system (Docker image). Is there a way to install only python3 bindings?
16.04 python3 boost
add a comment |
up vote
5
down vote
favorite
I am trying to install boost bindings for python3 on Ubuntu Xenial, but it pulls in whole python2.7 dependency tree. I do not want or need python2.7 on my system (Docker image). Is there a way to install only python3 bindings?
16.04 python3 boost
add a comment |
up vote
5
down vote
favorite
up vote
5
down vote
favorite
I am trying to install boost bindings for python3 on Ubuntu Xenial, but it pulls in whole python2.7 dependency tree. I do not want or need python2.7 on my system (Docker image). Is there a way to install only python3 bindings?
16.04 python3 boost
I am trying to install boost bindings for python3 on Ubuntu Xenial, but it pulls in whole python2.7 dependency tree. I do not want or need python2.7 on my system (Docker image). Is there a way to install only python3 bindings?
16.04 python3 boost
16.04 python3 boost
edited Nov 19 at 20:20
Ketan Patel
9,97594365
9,97594365
asked Aug 8 '17 at 0:10
Mitar
79678
79678
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
up vote
2
down vote
I have resolved to compiling and installing boost myself (I also installed/compiled Python 3.6 myself.). I have in my Dockerfile now:
# We have to compile it ourselves against the custom Python and cannot use Debian package.
# Includes a symlink workaround for: https://svn.boost.org/trac10/ticket/11120
RUN cd /usr/src &&
wget --no-verbose https://dl.bintray.com/boostorg/release/1.65.1/source/boost_1_65_1.tar.gz &&
tar xzf boost_1_65_1.tar.gz &&
cd boost_1_65_1 &&
ln -s /usr/local/include/python3.6m /usr/local/include/python3.6 &&
./bootstrap.sh --with-python=$(which python3) &&
./b2 install &&
rm /usr/local/include/python3.6 &&
ldconfig &&
cd / && rm -rf /usr/src/*
add a comment |
up vote
1
down vote
You have three options:
1. Build Boost.Python yourself
This is the option I recommend: it's clean, there's no risk to mess up your system and you have full control on what you get. Moreover1
Boost.Python is a separately-compiled (as opposed to header-only) library
so you can just build that. Download the archive and follow the instruction on the Getting Started guide. (This is what OP did.)
2. Use dpkg
to avoid installing unwanted dependecies
If you don't want to build Boost.Python yourself, you can bypass apt
(and its dependencies cheking) with dpkg
.
Let's say you want to install a package named foo
which depends on bar
and baz
, but you don't actually need baz
.
apt download foo bar
sudo dpkg --ignore-depends=baz --install foo.deb bar.deb
Notice that apt
will still complain about unresolved dependencies (but hey, that's its job), so the problem is not entirely solved: you just swept it under the carpet.
This option is quicker than the previous one, but I wouldn't recommend it.
3. Use equivs
to fool apt
This is new to me. Apparently, you can create dummy packages to fulfill the dependencies.
In this way, you don't have to install unwanted/unnecessary packages and apt
will not complain about it.
As I said, I've never used equivs
before, but you can find out more about it here.
add a comment |
up vote
0
down vote
due to my research, it's not possible
libboost-python-dev
package has libboost-python1.67-dev
dependency.
https://packages.debian.org/sid/libboost-python-dev
and libboost-python1.67-dev
has python-dev
dependency which uses python 2
https://packages.debian.org/sid/libboost-python1.67-dev
so you cannot do this I think you cannot do this in Debian.
I recommend checking arch base
and rpm base
distros.
add a comment |
up vote
-2
down vote
I can offer two solutions, one is to build a Python:3.6 image from scratch. Here python3.x becomes the de-facto choice.
Also, another option which worked for me (in Mac OSX) was:
brew install boost-python --with-python3 --without-python
2
Homebrew on Ubuntu??
– Leopd
Nov 19 at 19:48
add a comment |
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
I have resolved to compiling and installing boost myself (I also installed/compiled Python 3.6 myself.). I have in my Dockerfile now:
# We have to compile it ourselves against the custom Python and cannot use Debian package.
# Includes a symlink workaround for: https://svn.boost.org/trac10/ticket/11120
RUN cd /usr/src &&
wget --no-verbose https://dl.bintray.com/boostorg/release/1.65.1/source/boost_1_65_1.tar.gz &&
tar xzf boost_1_65_1.tar.gz &&
cd boost_1_65_1 &&
ln -s /usr/local/include/python3.6m /usr/local/include/python3.6 &&
./bootstrap.sh --with-python=$(which python3) &&
./b2 install &&
rm /usr/local/include/python3.6 &&
ldconfig &&
cd / && rm -rf /usr/src/*
add a comment |
up vote
2
down vote
I have resolved to compiling and installing boost myself (I also installed/compiled Python 3.6 myself.). I have in my Dockerfile now:
# We have to compile it ourselves against the custom Python and cannot use Debian package.
# Includes a symlink workaround for: https://svn.boost.org/trac10/ticket/11120
RUN cd /usr/src &&
wget --no-verbose https://dl.bintray.com/boostorg/release/1.65.1/source/boost_1_65_1.tar.gz &&
tar xzf boost_1_65_1.tar.gz &&
cd boost_1_65_1 &&
ln -s /usr/local/include/python3.6m /usr/local/include/python3.6 &&
./bootstrap.sh --with-python=$(which python3) &&
./b2 install &&
rm /usr/local/include/python3.6 &&
ldconfig &&
cd / && rm -rf /usr/src/*
add a comment |
up vote
2
down vote
up vote
2
down vote
I have resolved to compiling and installing boost myself (I also installed/compiled Python 3.6 myself.). I have in my Dockerfile now:
# We have to compile it ourselves against the custom Python and cannot use Debian package.
# Includes a symlink workaround for: https://svn.boost.org/trac10/ticket/11120
RUN cd /usr/src &&
wget --no-verbose https://dl.bintray.com/boostorg/release/1.65.1/source/boost_1_65_1.tar.gz &&
tar xzf boost_1_65_1.tar.gz &&
cd boost_1_65_1 &&
ln -s /usr/local/include/python3.6m /usr/local/include/python3.6 &&
./bootstrap.sh --with-python=$(which python3) &&
./b2 install &&
rm /usr/local/include/python3.6 &&
ldconfig &&
cd / && rm -rf /usr/src/*
I have resolved to compiling and installing boost myself (I also installed/compiled Python 3.6 myself.). I have in my Dockerfile now:
# We have to compile it ourselves against the custom Python and cannot use Debian package.
# Includes a symlink workaround for: https://svn.boost.org/trac10/ticket/11120
RUN cd /usr/src &&
wget --no-verbose https://dl.bintray.com/boostorg/release/1.65.1/source/boost_1_65_1.tar.gz &&
tar xzf boost_1_65_1.tar.gz &&
cd boost_1_65_1 &&
ln -s /usr/local/include/python3.6m /usr/local/include/python3.6 &&
./bootstrap.sh --with-python=$(which python3) &&
./b2 install &&
rm /usr/local/include/python3.6 &&
ldconfig &&
cd / && rm -rf /usr/src/*
answered Nov 21 at 2:08
Mitar
79678
79678
add a comment |
add a comment |
up vote
1
down vote
You have three options:
1. Build Boost.Python yourself
This is the option I recommend: it's clean, there's no risk to mess up your system and you have full control on what you get. Moreover1
Boost.Python is a separately-compiled (as opposed to header-only) library
so you can just build that. Download the archive and follow the instruction on the Getting Started guide. (This is what OP did.)
2. Use dpkg
to avoid installing unwanted dependecies
If you don't want to build Boost.Python yourself, you can bypass apt
(and its dependencies cheking) with dpkg
.
Let's say you want to install a package named foo
which depends on bar
and baz
, but you don't actually need baz
.
apt download foo bar
sudo dpkg --ignore-depends=baz --install foo.deb bar.deb
Notice that apt
will still complain about unresolved dependencies (but hey, that's its job), so the problem is not entirely solved: you just swept it under the carpet.
This option is quicker than the previous one, but I wouldn't recommend it.
3. Use equivs
to fool apt
This is new to me. Apparently, you can create dummy packages to fulfill the dependencies.
In this way, you don't have to install unwanted/unnecessary packages and apt
will not complain about it.
As I said, I've never used equivs
before, but you can find out more about it here.
add a comment |
up vote
1
down vote
You have three options:
1. Build Boost.Python yourself
This is the option I recommend: it's clean, there's no risk to mess up your system and you have full control on what you get. Moreover1
Boost.Python is a separately-compiled (as opposed to header-only) library
so you can just build that. Download the archive and follow the instruction on the Getting Started guide. (This is what OP did.)
2. Use dpkg
to avoid installing unwanted dependecies
If you don't want to build Boost.Python yourself, you can bypass apt
(and its dependencies cheking) with dpkg
.
Let's say you want to install a package named foo
which depends on bar
and baz
, but you don't actually need baz
.
apt download foo bar
sudo dpkg --ignore-depends=baz --install foo.deb bar.deb
Notice that apt
will still complain about unresolved dependencies (but hey, that's its job), so the problem is not entirely solved: you just swept it under the carpet.
This option is quicker than the previous one, but I wouldn't recommend it.
3. Use equivs
to fool apt
This is new to me. Apparently, you can create dummy packages to fulfill the dependencies.
In this way, you don't have to install unwanted/unnecessary packages and apt
will not complain about it.
As I said, I've never used equivs
before, but you can find out more about it here.
add a comment |
up vote
1
down vote
up vote
1
down vote
You have three options:
1. Build Boost.Python yourself
This is the option I recommend: it's clean, there's no risk to mess up your system and you have full control on what you get. Moreover1
Boost.Python is a separately-compiled (as opposed to header-only) library
so you can just build that. Download the archive and follow the instruction on the Getting Started guide. (This is what OP did.)
2. Use dpkg
to avoid installing unwanted dependecies
If you don't want to build Boost.Python yourself, you can bypass apt
(and its dependencies cheking) with dpkg
.
Let's say you want to install a package named foo
which depends on bar
and baz
, but you don't actually need baz
.
apt download foo bar
sudo dpkg --ignore-depends=baz --install foo.deb bar.deb
Notice that apt
will still complain about unresolved dependencies (but hey, that's its job), so the problem is not entirely solved: you just swept it under the carpet.
This option is quicker than the previous one, but I wouldn't recommend it.
3. Use equivs
to fool apt
This is new to me. Apparently, you can create dummy packages to fulfill the dependencies.
In this way, you don't have to install unwanted/unnecessary packages and apt
will not complain about it.
As I said, I've never used equivs
before, but you can find out more about it here.
You have three options:
1. Build Boost.Python yourself
This is the option I recommend: it's clean, there's no risk to mess up your system and you have full control on what you get. Moreover1
Boost.Python is a separately-compiled (as opposed to header-only) library
so you can just build that. Download the archive and follow the instruction on the Getting Started guide. (This is what OP did.)
2. Use dpkg
to avoid installing unwanted dependecies
If you don't want to build Boost.Python yourself, you can bypass apt
(and its dependencies cheking) with dpkg
.
Let's say you want to install a package named foo
which depends on bar
and baz
, but you don't actually need baz
.
apt download foo bar
sudo dpkg --ignore-depends=baz --install foo.deb bar.deb
Notice that apt
will still complain about unresolved dependencies (but hey, that's its job), so the problem is not entirely solved: you just swept it under the carpet.
This option is quicker than the previous one, but I wouldn't recommend it.
3. Use equivs
to fool apt
This is new to me. Apparently, you can create dummy packages to fulfill the dependencies.
In this way, you don't have to install unwanted/unnecessary packages and apt
will not complain about it.
As I said, I've never used equivs
before, but you can find out more about it here.
edited Nov 22 at 9:55
answered Nov 20 at 17:26
francescop21
11817
11817
add a comment |
add a comment |
up vote
0
down vote
due to my research, it's not possible
libboost-python-dev
package has libboost-python1.67-dev
dependency.
https://packages.debian.org/sid/libboost-python-dev
and libboost-python1.67-dev
has python-dev
dependency which uses python 2
https://packages.debian.org/sid/libboost-python1.67-dev
so you cannot do this I think you cannot do this in Debian.
I recommend checking arch base
and rpm base
distros.
add a comment |
up vote
0
down vote
due to my research, it's not possible
libboost-python-dev
package has libboost-python1.67-dev
dependency.
https://packages.debian.org/sid/libboost-python-dev
and libboost-python1.67-dev
has python-dev
dependency which uses python 2
https://packages.debian.org/sid/libboost-python1.67-dev
so you cannot do this I think you cannot do this in Debian.
I recommend checking arch base
and rpm base
distros.
add a comment |
up vote
0
down vote
up vote
0
down vote
due to my research, it's not possible
libboost-python-dev
package has libboost-python1.67-dev
dependency.
https://packages.debian.org/sid/libboost-python-dev
and libboost-python1.67-dev
has python-dev
dependency which uses python 2
https://packages.debian.org/sid/libboost-python1.67-dev
so you cannot do this I think you cannot do this in Debian.
I recommend checking arch base
and rpm base
distros.
due to my research, it's not possible
libboost-python-dev
package has libboost-python1.67-dev
dependency.
https://packages.debian.org/sid/libboost-python-dev
and libboost-python1.67-dev
has python-dev
dependency which uses python 2
https://packages.debian.org/sid/libboost-python1.67-dev
so you cannot do this I think you cannot do this in Debian.
I recommend checking arch base
and rpm base
distros.
answered Nov 20 at 18:09
mahradbt
212
212
add a comment |
add a comment |
up vote
-2
down vote
I can offer two solutions, one is to build a Python:3.6 image from scratch. Here python3.x becomes the de-facto choice.
Also, another option which worked for me (in Mac OSX) was:
brew install boost-python --with-python3 --without-python
2
Homebrew on Ubuntu??
– Leopd
Nov 19 at 19:48
add a comment |
up vote
-2
down vote
I can offer two solutions, one is to build a Python:3.6 image from scratch. Here python3.x becomes the de-facto choice.
Also, another option which worked for me (in Mac OSX) was:
brew install boost-python --with-python3 --without-python
2
Homebrew on Ubuntu??
– Leopd
Nov 19 at 19:48
add a comment |
up vote
-2
down vote
up vote
-2
down vote
I can offer two solutions, one is to build a Python:3.6 image from scratch. Here python3.x becomes the de-facto choice.
Also, another option which worked for me (in Mac OSX) was:
brew install boost-python --with-python3 --without-python
I can offer two solutions, one is to build a Python:3.6 image from scratch. Here python3.x becomes the de-facto choice.
Also, another option which worked for me (in Mac OSX) was:
brew install boost-python --with-python3 --without-python
answered Aug 9 '17 at 17:34
envy_intelligence
1073
1073
2
Homebrew on Ubuntu??
– Leopd
Nov 19 at 19:48
add a comment |
2
Homebrew on Ubuntu??
– Leopd
Nov 19 at 19:48
2
2
Homebrew on Ubuntu??
– Leopd
Nov 19 at 19:48
Homebrew on Ubuntu??
– Leopd
Nov 19 at 19:48
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f944035%2finstalling-libboost-python-dev-for-python3-without-installing-python2-7%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown