Difficulty Installing Python make: *** [Makefile:2255: install] Error 1 [Solved]

Alexzee

Silver Member
Silver Supporter
Joined
Jun 1, 2019
Messages
5,103
Reaction score
3,091
Credits
32,664
After downloading (gzipped tar) Python from python.org I followed the build instructions in the make file.

To double check that I had the files in the Python directory that I un-zipped I listed them from the command-line.

Code:
alex@debian-box:~/Python/Python-3.13.5$ ls
aclocal.m4         Grammar          Makefile.pre.in  pyconfig.h.in
Android            Include          Misc             python
_bootstrap_python  install-sh       Modules          Python
build              InternalDocs     Objects          python-config
config.guess       iOS              Parser           python-config.py
config.log         Lib              PC               python-gdb.py
config.status      libpython3.13.a  PCbuild          README.rst
config.sub         LICENSE          platform         Tools
configure          Mac              Programs
configure.ac       Makefile         pybuilddir.txt
Doc                Makefile.pre     pyconfig.h

Running ./configure
make
make test
sudo make install
Were the instructions I that followed. Running sudo make install returned this error:

Code:
subprocess.CalledProcessError: Command '['/home/alex/Python/Python-3.13.5/python', '-W', 'ignore::DeprecationWarning', '-c', '\nimport runpy\nimport sys\nsys.path = [\'/tmp/tmpfz_4cmty/pip-25.1.1-py3-none-any.whl\'] + sys.path\nsys.argv[1:] = [\'install\', \'--no-cache-dir\', \'--no-index\', \'--find-links\', \'/tmp/tmpfz_4cmty\', \'--root\', \'/\', \'--upgrade\', \'pip\']\nrunpy.run_module("pip", run_name="__main__", alter_sys=True)\n']' returned non-zero exit status 1.
make: *** [Makefile:2255: install] Error 1
alex@debian-box:~/Python/Python-3.13.5$ dpkg -L python
dpkg-query: package 'python' is not installed
Use dpkg --contents (= dpkg-deb --contents) to list archive files contents.
alex@debian-box:~/Python/Python-3.13.5$

I'm not sure what the system is missing if anything and I wasn't sure if I should have just ran the intall-sh.
Any ideas men?

Thanks in advance
Alex
 

Attachments

  • Python Build Inst.png
    Python Build Inst.png
    169.4 KB · Views: 206
Last edited:


It failed because python package is not installed.
You can verify if it exists in distro's repo with rmadison python

And then install it.
Running rmadison python returns:
Code:
sparky:~$ apt-cache search rmadison python
devscripts - scripts to make the life of a Debian Package maintainer easier

I tried apt-cache search python and a list of all of the python libs and packages were shown in the terminal.

Code:
sparky:~$ sudo apt install python3
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3 is already the newest version (3.11.2-1+b1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Code:
sparky:~$ python3
Python 3.11.2 (main, Apr 28 2025, 14:11:48) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> print('HelloWorld')
HelloWorld
>>> print('PythonWorking in SparkyLinux')
PythonWorking in SparkyLinux

It's installed now in Sparky Linux. Part of the problem was I didn't know how to launch it. Typing python didn't work. I found out I needed to type "python3"
However, I'm still having trouble getting python installed in my stable install of Debian 12.
I'll reboot in a little while, boot into Debian 12 and let you know.
 

Attachments

  • APT Python.png
    APT Python.png
    157.1 KB · Views: 173
It seems odd that you would need python to build python. I mean, if it's already installed, why do you need to build it?

But I do see a file that looks like a python binary in your directory above. What if you add this to your path?

export PATH=$PATH:/~/Python/Python-3.13.5
 
devscripts - scripts to make the life of a Debian Package maintainer easier
You need to install devscripts to have rmadison, but that's optional.
From what I've verified python package is old package, it no longer exists in Debian 12

Bash:
hex@msi:~$ rmadison python --architecture amd64
python     | 2.7.16-1      | oldoldstable | amd64

You may need to run update-alternatives and set python there to point to python3
 
It seems odd that you would need python to build python. I mean, if it's already installed, why do you need to build it?

But I do see a file that looks like a python binary in your directory above. What if you add this to your path?

export PATH=$PATH:/~/Python/Python-3.13.5
Python is installed on my Sparky Linux installation and works well.
The problem is attempting to install it on the Debian 12 installation fails.
APT can't find python using the command-line in Debian.

Running export PATH=$PATH:/~/Python/Python-3.13.5 returns nothing.
 
It shouldn't return anything, but now you should be able to find python3

Code:
which python

python -V

If those don't work...

Code:
cd ~/Python/Python-3.13.5

./python -V
Ok, it looks like Python is installed on Debian 12.
There's an issue with the msvcrt module.

Code:
debian-box:~$ python3
Python 3.13.5 (main, Jul  8 2025, 20:38:54) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
warning: can't use pyrepl: No module named 'msvcrt'
>>> print('HelloLinux World')
HelloLinux World


>>>

Code:
debian-box:~$ python -v
bash: python: command not found
@debian-box:~$ cd ~/Python/Python-3.13.5
@debian-box:~/Python/Python-3.13.5$ ./python -V
Python 3.13.5

If I'm not mistaken, I need to be able to create file.py's so if the msvcrt module doesn't exist this will have to be fixed? Right?
 
If I'm not mistaken, I need to be able to create file.py's so if the msvcrt module doesn't exist this will have to be fixed? Right?

That is one solution, do you have pip installed?

I personally would try..

Code:
pip install  msxcrt
 
That is one solution, do you have pip installed?

I personally would try..

Code:
pip install  msxcrt
Code:
pip install  msxcrt

>>> >>>   File "<stdin>", line 1
    pip install  msxcrt
        ^^^^^^^
SyntaxError: invalid syntax
>>> >>>

Should I proceed with pip?
Python3-pip instead of pip will be used.

Code:
debian-box:~$ sudo apt install pip
[sudo] password for alex:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'python3-pip' instead of 'pip'
The following additional packages will be installed:
  libexpat1-dev libjs-jquery libjs-sphinxdoc libjs-underscore libpython3-dev
  libpython3.11-dev python3-dev python3-pkg-resources python3-setuptools
  python3-wheel python3.11-dev zlib1g-dev
Suggested packages:
  python-setuptools-doc
The following NEW packages will be installed:
  libexpat1-dev libjs-jquery libjs-sphinxdoc libjs-underscore libpython3-dev
  libpython3.11-dev python3-dev python3-pip python3-pkg-resources
  python3-setuptools python3-wheel python3.11-dev zlib1g-dev
0 upgraded, 13 newly installed, 0 to remove and 0 not upgraded.
Need to get 9,205 kB of archives.
After this operation, 41.3 MB of additional disk space will be used.
Do you want to continue? [Y/n]
 


Follow Linux.org

Members online


Top