Não é possível usar python3

0

Inconscientemente eu apaguei as pastas python no diretório / (root), então recebi este erro quando tentei executar o python3.

Eu reinstalei o python3.2.3 version manualmente fazendo downlading e instalando com a ajuda do arquivo read me . Ainda enfrenta o mesmo problema.

next@NEXT-IN-WS010:~$ python3
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/sysconfig.py", line 334, in _init_posix
_parse_makefile(makefile, vars)
  File "/usr/local/lib/python3.2/sysconfig.py", line 220, in _parse_makefile
with open(filename, errors="surrogateescape") as f:
IOError: [Errno 2] No such file or directory: '/usr/local/lib/python3.2/config-3.2mu/Makefile'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.2/site.py", line 529, in <module>
main()
  File "/usr/local/lib/python3.2/site.py", line 517, in main
known_paths = addusersitepackages(known_paths)
  File "/usr/local/lib/python3.2/site.py", line 263, in addusersitepackages
user_site = getusersitepackages()
  File "/usr/local/lib/python3.2/site.py", line 238, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
  File "/usr/local/lib/python3.2/site.py", line 228, in getuserbase
USER_BASE = get_config_var('userbase')
  File "/usr/local/lib/python3.2/sysconfig.py", line 577, in get_config_var
return get_config_vars().get(name)
  File "/usr/local/lib/python3.2/sysconfig.py", line 474, in get_config_vars
_init_posix(_CONFIG_VARS)
  File "/usr/local/lib/python3.2/sysconfig.py", line 339, in _init_posix
raise IOError(msg)
IOError: invalid Python installation: unable to open /usr/local/lib/python3.2/config-3.2mu/Makefile (No such file or directory)

Existe uma solução ou devo reinstalar o sistema operacional

Nota: se for possível abrir versões superiores como 3.3 (ou acima) em vez de 3.2.3, é bem-vindo

Editar 1: Quando tentei usar sudo apt-get install python3 , ele diz que o python3 já está na versão mais recente.

    
por anand mbs 07.06.2016 / 10:46

1 resposta

0

Encontrei minha solução novamente.

Quando encontrei vários links e finalmente encontrei este link .

Basta reinstalar a versão python3 e inserir hash -r para restaurar a versão, com os seguintes comandos.

cd "to the directory where downloaded python is"
./configure
make
make test
sudo make install
hash -r
    
por anand mbs 07.06.2016 / 11:15