New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to get external dependencies for CPython on Ubuntu Linux 20.04.1 #88158
Comments
I'm trying to build CPython on Ubuntu but I can't get the external dependencies. Running this command :- $ sudo apt-get build-dep python3 gives the output :- Reading package lists... Done What is the exact string to add to /etc/apt/sources.list? System Info: Ubuntu 20.04.1 (Focal Fossa) (I've posted the problem in this issue tracker because Google and Stack Overflow doesn't seem to have an answer. I'm sorry for posting this here but no one seem to have the answer to this apart from core or experienced developers.) |
I've tweaked some of my settings and was able to get the dependencies but they are out of date. I tried upgrading them but not working. (I'm not new to Ubuntu but I'm also not excellent at Ubuntu. A little bit of explanation would be helpful.) |
apt build-dep (or aptitude build-dep) is a command used to get build-time dependencies for the system package, which are not always the same as the upstream in-development version of Python. As the error message told you, you need deb-src lines in your sources.list to have this work. An example is here, it may not be up-to-date (refers to ubuntu bionic and python3.6) but hopefully you can adapt it: https://devguide.python.org/setup/#build-dependencies I think more explanations should come from ubuntu documentation or forums, not Python docs; Python can’t document every facility from every OS. |
I know the deb-src problem and I've added that a long time ago. The problem is that I don't know which repository has the unstable source. I'm on Ubuntu Focal Fossa. I successfully can fetch sources but they are not up-to-date. I can't figure out the repository and the component. |
It's also pretty problematic that Python depends on the system header code rather than fetched source code like we do in OS X or Windows. I would like to suggest that we fetch source code and then use that instead of system header files. This wouldn't be a problem to implement since OS X and Linux behave in the same way because both share the same UNIX kernel and it wouldn't break any code out there. In fact it would improve the code. This would reduce all the setup we have to do beforehand on Linux especially Debian distributions. |
This problem doesn't exist in RPM Linux. Therefore creating a new DebianBuild directory (like there is PCBuild, Mac) just for Debian Linux. (I haven't tested RPM Linux and can't access any right now therefore I don't know if the problem exists there or not. But I'm gonna guess not for now.) |
Here's a trick I often recommend: You'll find it in your CPython git repo: apt-get -yq install \ Should work well on all Debian based Linux distros (that includes Ubuntu). |
I figured out the commands. The problem is they are not upgraded. |
This isn't a bug with Python, it is a development environment issue. The discussion would be more appropriate in help forums, like on discuss.python.org or Stackoverflow. And, if there si some deficiency in the devguide, there is a tracker for issues with it: https://github.com/python/devguide/issues |
I have been following this issue for a while. I feel it's getting increasingly offtopic for Python bug tracker. Any concerns or problems with your distro are better suited for the help and discussion forums of your distribution. Ah, Ned just closed the issue while I was typing. |
I never said this was a bug. But what I'm saying is there should be a different build for Debian because Debian has a reputation of using outdated packages. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: