Software :: Build Pygtk With Non System Default Python?
Apr 13, 2011
I'm on Debian Lenny. I've built and installed python-3.2 in /opt/python-3.2. Then i want to build and install pygtk, pycairo with /opt/python-3.2 and install them in that folder and not to use system default python (which is python-2.6) for their build process.
How do I tell pygtk and pycairo 's configure and makefile script to use /opt/python-3.2 's interpreter, include file and library for their build process(and not the system default python)?
I tried doing ./configure --help in pygtk folder but there was no option for specific non-system default python's folder location. Anyone has any ideas?
I have tried rebuilding pygtk after installing Numpy and ended up making a mess of python. I have it back to functional now, but I would like to know how to properly add numeric python support. I suspect there is a proper order to building all of the python dependencies that yields success. Ultimately I am trying to run mypaint.
I run Wheezy Xfce 64-bit. I went through the Synaptic listings and added Python 3.3.2 and Tkinter for it, and that works fine; but for some reason PyGtk is available only for Python 2.7, not for Python 3.3, unless I'm just using the wrong way to try to find it. Is there a PyGtk available for Python 3.3 in Wheezy, and, if so, how do I install it and then import it once it's installed?
I am having trouble in configuring xorg.conf. I am running Suse 11.3 desktop on my PC. Also, I have one onboard nvidia graphics 6150SE and I have put one nvidia 8400GS 512Mb in the 16X PCIe slot for the additional seat...
So kindly tell me what should I do now or what things are missing ?? For any further info abt my PC plz tell me to post outputs(specify the commands for the same..)
I am using ubuntu hardy and python 2.6.5 (built from sources). For a custom python packager I need to rebuild python interpreter (python executable). I am new to linux and don't have much knowledge of gcc and other stuff. Here is the process:1. Copy python.c as myapp.c. myapp.c is in the same directory (python2.6.5) in which I have all the required files. 2. Using the syntax from makefile of python sources, here is my first command to produce myapp.o
Code: gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I/home/zeno/installed/Python-2.6.5/Include -fPIC -DPy_BUILD_CORE -c myapp.c -o myapp.o This produce myapp.o but throws a warning:
Code: myapp.c:24:2: warning: no newline at end of file Next is to produce the executable or python interpreter: Code: gcc -pthread -Xlinker -export-dynamic -o $@ myapp.o -L. -lpython2.6 -lpthread -ldl -lutil -lm -o myapp This is causing an error: Code: /usr/lib/gcc/i486-linux-gnu/4.2.4/../../../../lib/crt1.o: In function `_start': (.text+0x18): undefined reference to `main'
I am trying to build a Python module (pyfits) but I get the following error:
# python setup.py install /home/steve/src/pyfits-2.2.2/stsci_distutils_hack.py:239: DeprecationWarning: os.popen3 is deprecated. Use the subprocess module.
I would like to install pymedia on my ubuntu 9.10 karmic distribution, but I am having a bit of a hard time doing that.I managed to install all the libraries (lame, libogg, libvorbis etc.) but when trying to run 'python setup.py build' I get an error (Shown at the end).I found on the interwebs that it may have to do with the version of gcc c++ compiler running (currently gcc-4.4) and that it only works with gcc-3.x. Therefore I downloaded gcc-3.4 (from the old jaunty archive), and with this one still no joy.NebelhomP.S. I am not a complete newcomer to linux and python but I am not an expert so it may happen that I ask questions with a very obvious answer.
Code: nebelhom@nebelhom-desktop:~/pymedia-1.3.7.3$ python setup.py build Using UNIX configuration...
how you change the default version of python in Lucid. Lucid comes packaged with 2.6 but we use 2.5 where I work. I didn't see much of anything on the web for this topic so figured I'd post something. If you are installing python2.5 on Lucid version 10.04 (comes package with 2.6 only)
I have just installed SABnzb application in my home folder. The executable file is SABnzb.py When I run the command in the Konsole # python SABnzb.py I have this Quote: python: can't open file 'SABnzbd.py': [Errno 2] No such file or directory
I was zsync-ing the latest Ubuntu 11.10 Alpha and thought I'd make a little GUI for it as a small project. The gui is set up, I just need to figure out how to run zsync with content from to variables, cto and cfrom. I tried the following code:
I am in the beginning stages of building an LFS (http://linuxfromscratch.org) system, but the thing is I don't have any space on my laptop to build it on. However, recently the GPU on my desktop went down and I have been unwilling to take the steps to have it fixed (variety of reasons). My main worry about building an LFS system was about rendering the computer unusable, but since this machine was already broken...I am looking at this as an opportunity.
I had two hard-drives on the desktop, one with linux (ssh enabled) and the other had windows which I subsequently deleted. Since I can't use the desktop directly because of the broken GPU, I am thinking of using ssh to connect and build the rest from there. So far, everything seems to be going according to plan, but I am just beginning the build, so thus far I have only partitioned and built the filesystems.
I'm new to Linux, and want to build a system for openSuse 11.3 on Friday.I plan to buy everything then.I'm using Ubuntu now on my laptop.My question is what do you think of the P4 prescott e series 800 mhz FSB as a processor for openSuse.Offer other processors if they will do a good job.
Every time I booted in 9.10, Python requested a password. I didn't plan to do any programming very soon (I'm new to Linux, although I know Unix) because I'm just learning the shell, etc, so I decided to uninstall Python through the Package Manager. I selected all of the installed Python modules and when I clicked "Apply" I was informed that there was one module (Python minimum something) that would seriously effect the whole system, so I unchecked that module and then ran the uninstall. When it completed, Firefox was gone, the two music players I had installed where gone, I couldn't log out and when I try to reboot I get a message "Ubuntu is running in low-graphics mode" and I go through several other menus, but I still can't get the system to boot.I assume a reinstall is in order, but should I "clean up" any of the remaining Linux modules/partition? And what's the best way to do that?
I have a bit of mystery regarding my system intermittently freezing. First off, the info. I using/running: Ubuntu 10.10, 64bit version (clean installation) Intel(R) Core(TM)2 Duo CPU E8500 @ 3.16GHz (not overclocked) 6GB RAM Nvidia GTX260 Nvidia proprietary drivers 1TB Western Digital HD (32MB cache) Now, the problem: A while ago, I started experiencing intermittent system freezes that would last for 2 or 3 minutes and happen about once every 45 to 75 minutes.
The Gnome System Monitor (GSM) would show 100% CPU utilization, but top, htop, and conky only show about 11% usage. I pulled up the process list in GSM. However, I had issues, for the obvious reason, when bringing it up when the CPU was spiking. Even when I could, it only showed the usual suspects (Firefox, Deluge, Ktorrent, and Xorg) running the high single digits. This was backed up in top, htop, and conky. I also checked the RAM, but usage was down around 25%, with nothing in the swap.
I checked the messages log, but there was nothing there. Nor in dmesg. At least not that my limited Linux admin skills could find. The freeze just happened, so I've attached them in their entirety. I've come to suspect that Python is the cause. It happens most often when I have Ktorrent or Deluge going. I used to use Deluge, but moved to Ktorrent to test if Deluge itself was the problem. They're both written in python though, and both seem to cause the slowdown. It also happens when other python-based programs are running, such as the updater, but not as much or as bad. Things I've tried to fix the problem:
- Clean install (first time in over 18 months) - Updated Nvidia driver by adding a repository - Updated Deluge by adding a repository - Enabled backports. - Gave my PC the finger
This is driving me nuts. If it was just BT clients, I'd only run those at nights, but it's also parts of Ubuntu itself that relies on python, which I really think is the problem.
I'm trying to build a system that uses jack2. So far as I can see, the jack version in Lenny repos is jack, rather than jack2. The jack website implies there is a .deb for jack2, but doesn't reveal how to access it. What should my next move be?
If you can access Suse Studio here is thlink to the buildLFS Host - SUSE GalleryGoogle hasn't been friendly and neither has a search on these forums, I don't know which man to read so a finger in the right dirrection (preferably not the middle) would be nice as far as that goesRight now the yast live installer trips up at %84 while saving the boot loader configuration and displays a popup that says �An error occurred during initrd creation. /sbin/mkinitrd: illegal optionI then press enter to acknowledge the message and the installation continues without a hitch.
When I go to boot up (no other os installed) grub says it cant find the file initrd-2.6.34.7-0.5-defaultIf you boot the live cd again you can mount the boot partition and you�ll find a broken symlink called initrd that islooking for the missing file above.Like I said above, if it an obvious fix, all I need is some direction, I don't mind reading. (been doing that all day)If you need more specifics Id be happy to supply, I'm just not sure whats relevant and don't want to bloat the post.
I'm trying to write a python script that will use the current user's name when interacting. Ex: when started, it should say "hello daweefolk" when I am logged in. I've tried Code: username=os.system("echo $USER") but the variable remains empty. What is the correct code?
I am having a strange problem. No python application that is built on GTK doesn't works. I always get the error ''could not import module,module not found''. I f i try to install it it says its already installed, and if i try to remove python and reinstall it it will take all python apps with it. DO you know how can i fix this?
scanning them with Avast! and Malwarebytes Anti-Malware or by running registry cleaners like Ccleaner.However, I think it would be cool to have a Live system that I could boot from my flashdrive that I could have programs installed to do all this with.It would be cool if I could use Puppy Linux, since it loads and runs from RAM, which gives a huge speed boost when compared to running a live version of a distro like Ubuntu, but I don't really know my way around Puppy, or how to make my own "pupplet". Also, from what I could tell, Puppy Linux didn't have a package manager like Pacman or Aptitude.Here's a list of programs I would like to have a Linux alternative to use:-Avast! Anti-virus-Ccleaner (registry cleaner)-Malwarebytes Anti-Malware/Superantispyware (malware/spyware cleaner)-Perhaps also a Defrag program like Defraggle
I have recently trying to build an Accounts system database for a project. When you run the program it goes in the main menu sort of like this.
Accounts System Add a Customer With a Contract......1 Add a Customer Without a Contract...2 Display all Customers...............3 Find a Customer.....................4 Edit a Customer.....................5 Print a Statement...................6 Print an Invoice....................7 Load File...........................8 Save and Exit.......................9
When you add a customer with a contract, you add name, address, start contract, end contract, payment and email address. Now, is there a code I could write to get back to this menu. To not confuse anyone, all I just saying is supposing I accidentally push number 1 on the keyboard and suppose I didn't want to add a customer. In other words I need a code that can cancel (or stop) adding a customer to go back to the accounts system menu.
The whole day was more or less spent reinstalling a basic Gnome Ubuntu system. Everything went swimmingly until I started with the XBMC part of the installation. After wrestling with PPAs and apt-get for hours I finally got it installed, but then it all turned awkward in a hurry. It simply refused to start up. I clicked the icon and nothing happened for a good few seconds. The screen then flickered black for an instant, but after that nothing. I started from a terminal and it showed an error message saying it couldn't import Python's os and shutil modules. I found that mighty strange since both modules are part of the Python Standard Library.
Finally, in a bizarre twist, it turns out this doesn't seem to be a XBMC problem, suddenly apt-get started complaining too. TL,DR: I (nor the system) can't import any Standard Library modules in Python in Ubuntu! Is this a path problem? Or have I actually managed to uninstall some vital python packages, if so which ones? I am running Ubuntu 10.10, but I don't think this is necessarily a Ubuntu specific problem. Here are some dumps to show the error messages: (I forgot to copy the XBMC error message, but it looked exactly the same as these below, i.e., it couldn't import the os module) First from apt-get:
Code:
tv@tv:/usr/lib$ sudo apt-get autoremove [sudo] password for tv: Reading package lists... Done Building dependency tree
I have a volume control program I am writing for oss. Everything works in the program but I would like window to appear above the notification area icon. Is there a way to do this? If not is it possible to have the window open at the mouse location so it looks like it is part of the notification icon?
I am playing around with PyGTK and come across a problem: When I put a TextView inside a ScrolledWindow, and type text into the TextView until it reaches the edge, the cursor goes outside the viewport and I can't see what I'm typing. How to make it so that the ScrolledWindow automatically scrolls so that the caret in the TextView is always in visible?
I have created a PyGTK app (a binary clock) that I would like to turn into a screensaver. I added the .desktop file to /usr/share/applications/screensavers/ but all I get when I select it is a black screen. On the GnomeScreensaver FAQ (here) it says to use a gsthemewindow as the toplevel window, but the libraries given are in C. Is there any way to:Import this C library to get access to this toplevel window, Convert this GTK+ C library to PyGTK, or use a pygtk app as a screensaver in some other way?
In order to get my Ubuntu system up and running on the Internet I need to install Sakis3g, and when installing, the system does not pick up ./Configure. My first thought was that the Build Essentials were not present but turns out that they are already installed, so now I'm at a dead end as I cannot finish my install. Has anyone else had any problems similar to this one?
I am able to build a shared library under solaris with /usr/local/bin/g++ -G -o output.so file1.o file2.o file3.o. How do I build the shared library under linux using the same files? I have tried to use the same command /usr/local/bin/g++ -g -o but I got some undefined references, even if those references are defined in one of the object files.
I have been reading about rescue CD's but haven't found out whether I can make one using my currently running Centos(centos-release-5-4.el5.centos.1 ).I tried to use a Centos cd we have here and it looks fine till it asks where the 'tree' structure is located, when I select cd it ejects it and asks the same question again. Do I need to build a rescue cd containing directory info of my specific system?This is related to wanting to fsck my file system.
I am developing a program in a system where the Linux does not take care of the sync command automatically. So I have to run it from my application always I save some data in the disk, which in my case is a 2GB sdcard. It is true that I can make the operation system takes care of the syncronization, using a proper mount option, but in this case the programm's performance drops drastically. In particular I use the shelve module from Python to save data that comes from a socket/TCP connection and I have to deal with the potencial risk of the system being turned off suddenly Initially I wrote something like that to save data using shelve:
But that takes too much time to save the data. Note that I use the sync from the OS every time I close a file to prevent data corruption in the case of the "computer" being turned off with data even in the buffer. To improve the performance I made something like that:
Code:
def saveListData( list ) fd = shelve.open('file_name', 'c') for itemVo in list: fd[itemVo.key] = itemVo fd.close() os.system("sync")
Thus, first I saved an amount of objects in a list then I open the file and save the objects. In this way I have to open the file just one time to save a lot of objects.However I would like to know if adding a lot of objects before closing the file would increase the risk of data corruption.I known that turning off the system after fd.close() and before os.sync may cause problems. But what about turning off the system after