且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在AWS EC2实例上安装并使tkinter正常工作

更新时间:2022-11-07 12:59:46

在前面的答案之后,我意识到了为什么它不起作用我使用EC2 Ubuntu实例使其工作并执行以下操作:

After the previous answers I realized why it was not working so I made it work using an EC2 Ubuntu instance and doing the following:

  export DEBIAN_FRONTEND=noninteractive
  sudo -E apt-get update
  sudo -E apt-get install -y ubuntu-desktop
  sudo add-apt-repository ppa:freenx-team
  sudo apt-get update
  sudo aptitude install -y freenx
  wget https://bugs.launchpad.net/freenxserver/+bug/576359/+attachment/1378450/+files/nxsetup.tar.gz
  tar -xvf nxsetup.tar.gz
  sudo cp nxsetup /usr/lib/nx/nxsetup
  sudo /usr/lib/nx/nxsetup --install 

然后在询问密码时拒绝回答,并这样做了:

Then said no when asked for a password and did:

  sudo vi /etc/ssh/sshd_config and set PasswordAuthentication to yes
  sudo /etc/init.d/ssh restart
  sudo passwd ubuntu
  sudo apt-get install gnome-session-fallback

完成此操作后,我在本地计算机上安装了NX客户端。
这一切都要感谢此页面

Once this was done I installed NX client on my local machine. All this thanks to this page

连接到我的新服务器,在那里我可以像这样安装python-tk:

Connected to my new server where I was able to install python-tk like that:

 sudo apt-get install python-tk

现在我可以在实例上使用tkinter :)

And now I can use tkinter on my instance :)