[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

import zlib in 2.5 fails

stuntgoat

1/4/2008 10:20:00 AM

import zlib works in Python 2.4 (debian etch AMD64 - default python
version for that distro)

I built python 2.5 from source; zlib is not importable.

I am trying to compile MySQLdb.

any clues about how to get zlib able to be imported in 2.5?

-sg
10 Answers

stuntgoat

1/4/2008 10:40:00 AM

0

Modules/main.c:186: warning: function declaration isn't a prototype
/home/name/Desktop/webdl/Python-2.5.1/Modules/_ctypes/libffi/src/x86/
ffi64.c:45: warning: function declaration isn't a prototype
/home/name/Desktop/webdl/Python-2.5.1/Modules/_ctypes/libffi/src/x86/
ffi64.c:342: warning: function declaration isn't a prototype
/usr/bin/ld: /usr/local/lib/libz.a(adler32.o): relocation R_X86_64_32
against `a local symbol' can not be used when making a shared object;
recompile with -fPIC
/usr/local/lib/libz.a: could not read symbols: Bad value
collect2: ld returned 1 exit status

this error occurred at one point during a compilation of Python 2.5.
It seems related to my inability to import zlib now.

On Jan 4, 10:19 am, stuntgoat <hyperne...@gmail.com> wrote:
> import zlib works in Python 2.4 (debian etch AMD64 - default python
> version for that distro)
>
> I built python 2.5 from source; zlib is not importable.
>
> I am trying to compile MySQLdb.
>
> any clues about how to get zlib able to be imported in 2.5?
>
> -sg

Zentrader

1/4/2008 5:17:00 PM

0

On Jan 4, 2:19 am, stuntgoat <hyperne...@gmail.com> wrote:
> import zlib works in Python 2.4 (debian etch AMD64 - default python
> version for that distro)
>
> I built python 2.5 from source; zlib is not importable.

2.5 has been available for some time in the Debian repositories.
Installing the .deb may provide better results. Note that you might
also have to upgrade the dependencies to a newer version. apt-get
will do all of this for you - "man apt-get" for all of the details.
http://packages.debian.org/etch...

stuntgoat

1/5/2008 9:50:00 AM

0

I was able to recompile zlib

$./configure --shared

then recompile Python 2.5.1; I am now able to import the zlib module.

cheers

-sg

I was able to recompile zlib

$./configure --shared

then recompile Python 2.5.1; I am now able to import the zlib module.

cheers

-sg



On Jan 4, 5:17 pm, Zentrader <zentrad...@gmail.com> wrote:
> On Jan 4, 2:19 am, stuntgoat <hyperne...@gmail.com> wrote:
>
> > import zlib works in Python 2.4 (debian etch AMD64 - default python
> > version for that distro)
>
> > I built python 2.5 from source; zlib is not importable.
>
> 2.5 has been available for some time in the Debian repositories.
> Installing the .deb may provide better results. Note that you might
> also have to upgrade the dependencies to a newer version. apt-get
> will do all of this for you - "man apt-get" for all of the details.http://packages.debian.org/etch...

news

4/4/2013 6:05:00 AM

0

mm <mm2005@bigfoot.com> wrote in
news:li4pl8tk2ncfh2mirnlkgqo1tielef6udk@4ax.com:

> On Wed, 3 Apr 2013 19:55:56 +0000 (UTC), cindys
> <cstein1@rochester.rr.com> wrote:
>
>>On Apr 3, 9:35?am, Susan S <otoeremovet...@ix.netcom.com> wrote:
>>> I was waiting on line at the Costco pharmacy recently and picked up
>>> the nearest item to read the package, just for something to do. The
>>> first thing I noticed was the wasteful packaging (42 tablets in a
>>> package about 12 x 4 or 5 inches, but the second was that the stuff
>>> was made in Israel. Here's what it looks like.
>>>
>>> http://tinyurl.c...
>>>
>>> Are there a lot of medicines made in Israel for export?
>>>
>>> Susan Silberstein
>>----------
>>Yes. Teva (an Israeli pharmaceutical company) is the largest producer
>>of generic pharmaceuticals in the world. That said, Teva also has
>>branches in Europe,
>
> A lot, maybe all of these plants were not opened by Teva, but were
> European drug companies bought by Teva, at what seems to me an
> enormous, brave investment. 3 companies for $19.3 billion dollars and
> a majority stake in a Japanese drug maker for 45 billion yen (which is
> "only" 400 million dollars, and $900 million for a production
> facililty in Japan. Over 20 billion dollars in the last 5 years.
> I'd never have nerve enough to spend so much money.
>
> My brother has a little stock in Teva and it's not doing so well, but
> I'll bet it does after Teva proves the investments were a good idea.
>
>> so not all medications produced at Teva would
>>necessarily come directly from Israel.
>>Best regards,
>>---Cindy S.
>

They also have aquired a major Canadian generic manufacturer and has
production facilities here.

David Makowsky

4/4/2013 3:52:00 PM

0

On Thursday, April 4, 2013 8:04:05 AM UTC-5, cindys wrote:

[ Snip ]

> Years ago, I made a lot of money by investing in Teva. In 2010, it was
> at its all-time high of over 60 dollars/share, but I was a less savvy
> investor then and hung onto it too long and ended up giving back about
> 20% of my profit (should have jumped ship when the stock had declined
> to 10%).

> Since 2010, Teva stock has had its ups and downs but mostly downs.
> Maybe Teva will start going up and return to its high and exceed it at
> some point, but we have been in a strong bull market for several years
> now, and a lot of solid companies are up 30% or more over the past few
> years.

> While a person is waiting for a stock to come back, other companies'
> stock is rising. It makes sense to me to invest in companies whose
> shares are currently on the rise (as long as the company has good
> fundamentals and the shares aren't overpriced). By waiting around for
> a company to come back, a person loses out on a lot of profits that
> could be made by investing in other companies in the meantime.
> Just my opinion.

I have worked in the finance industry for the past 11 years and I have an MBA with one of my concentrations in Finance. I know a "little" about this.

Market timing (When to get in and out of an investment based on predicting when that investment will start/stop to go up or down at precise instant in time) is very risky and is something to stay away from unless you have the stomach for such risk and can afford to lose money. There are few experts on market timing and I wouldn't believe most people who claim they are experts. It is very difficult to nail down and many of the "best" have lost a ton of money attempting to time the market.

That you lost a little from what you gained on your investment (Even going from a 10% loss to a 20% loss) because you stayed with a good thing for too long is not that big of a deal. Consider how well you did over the entire time you invested in it.

I actually wrote a lot more, but I have since deleted it since I am afraid it was too complicated and is not really the topic of this group.

sheldonlg

4/4/2013 4:25:00 PM

0

On 4/4/2013 11:52 AM, David Makowsky wrote:
> That you lost a little from what you gained on your investment (Even going from a 10% loss to a 20% loss) because you stayed with a good thing for too long is not that big of a deal. Consider how well you did over the entire time you invested in it.

I can't remember who said it, but it was very famous financier. He said
that he made his money in the market by selling stock he owned before it
hit the top and buying stock before it hit bottom. IOW, "pigs get fat
and hogs get slaughtered".

--
Shelly

mm

4/4/2013 8:11:00 PM

0

On Thu, 4 Apr 2013 15:52:23 +0000 (UTC), David Makowsky
<dlmakowsky@gmail.com> wrote:

>On Thursday, April 4, 2013 8:04:05 AM UTC-5, cindys wrote:
>
>[ Snip ]
>
>> Years ago, I made a lot of money by investing in Teva. In 2010, it was
>> at its all-time high of over 60 dollars/share, but I was a less savvy
>> investor then and hung onto it too long and ended up giving back about
>> 20% of my profit (should have jumped ship when the stock had declined
>> to 10%).
>
>> Since 2010, Teva stock has had its ups and downs but mostly downs.
>> Maybe Teva will start going up and return to its high and exceed it at
>> some point, but we have been in a strong bull market for several years
>> now, and a lot of solid companies are up 30% or more over the past few
>> years.
>
>> While a person is waiting for a stock to come back, other companies'
>> stock is rising. It makes sense to me to invest in companies whose
>> shares are currently on the rise (as long as the company has good
>> fundamentals and the shares aren't overpriced). By waiting around for
>> a company to come back, a person loses out on a lot of profits that
>> could be made by investing in other companies in the meantime.
>> Just my opinion.
>
>I have worked in the finance industry for the past 11 years and I have an MBA with one of my concentrations in Finance. I know a "little" about this.
>
>Market timing (When to get in and out of an investment based on predicting when that investment will start/stop to go up or down at precise instant in time) is very risky and is something to stay away from unless you have the stomach for such risk and can afford to lose money. There are few experts on market timing and I wouldn't believe most people who claim they are experts. It is very difficult to nail down and many of the "best" have lost a ton of money attempting to time the market.
>
>That you lost a little from what you gained on your investment (Even going from a 10% loss to a 20% loss) because you stayed with a good thing for too long is not that big of a deal. Consider how well you did over the entire time you invested in it.
>
>I actually wrote a lot more, but I have since deleted it since I am afraid it was too complicated and is not really the topic of this group.

This investment is only a small part of my brother's savings, and the
primiary goal was to invest in Israel. Making a profit remains a
secndary goal and one year is much too short a time to tell how it
will do. Of all the gifts I've ever bought my brother, the one he
received with the most enthusiasm was trees in Israel.

Someone I knew used to sort of ridicule those who wanted their names,
or even their parents' names on items in the shul, and I absorbed some
of that.

Until my first trip to Israel. My Israeli friend had to deliver a DNA
or some kind of sample to a lab in the Technion, and while she talked
to her buddies, I looked at the brass plaques in the hall opposite the
stairs. There are a lot, many from Technion societies around the
world, many in the US. Other plaques name individuals. And it
occurred to me that, short of living in Israel, how wonderful it would
be to have my name on a plaque firmly affixed to the wall of a big,
heavy, good building like one the Technion's.

On my second trip, I bought a used phone and even though that is not
affixed to anything, the thought that I have my own Israeli phone
number, even when I'm not there, even when the battery is not charged,
still delights me.


My father lost money in 1929, in the Crash. To cheer himself up, my
mother told me, he took a month's trip to Israel in 1936. (So plainly
he didn't lose all his money.) I've read that for those who met
their margin calls and didn't sell their stocks through the
Depression, the odds were better than even they'd make money, though I
don't know what was meant by "make money".
--

Meir

cindys

4/5/2013 4:37:00 AM

0

On Apr 4, 11:52 am, David Makowsky <dlmakow...@gmail.com> wrote:
> On Thursday, April 4, 2013 8:04:05 AM UTC-5, cindys wrote:
>
> [ Snip ]
>
>
>
>
>
>
>
>
>
> > Years ago, I made a lot of money by investing in Teva. In 2010, it was
> > at its all-time high of over 60 dollars/share, but I was a less savvy
> > investor then and hung onto it too long and ended up giving back about
> > 20% of my profit (should have jumped ship when the stock had declined
> > to 10%).
> > Since 2010, Teva stock has had its ups and downs but mostly downs.
> > Maybe Teva will start going up and return to its high and exceed it at
> > some point, but we have been in a strong bull market for several years
> > now, and a lot of solid companies are up 30% or more over the past few
> > years.
> > While a person is waiting for a stock to come back, other companies'
> > stock is rising. It makes sense to me to invest in companies whose
> > shares are currently on the rise (as long as the company has good
> > fundamentals and the shares aren't overpriced). By waiting around for
> > a company to come back, a person loses out on a lot of profits that
> > could be made by investing in other companies in the meantime.
> > Just my opinion.
>
> I have worked in the finance industry for the past 11 years and I have an MBA with one of my concentrations in Finance.  I know a "little" about this.
>
> Market timing (When to get in and out of an investment based on predicting when that investment will start/stop to go up or down at precise instant in time) is very risky and is something to stay away from unless you have the stomach for such risk and can afford to lose money.  There are few experts on market timing and I wouldn't believe most people who claim they are experts.  It is very difficult to nail down and many of the "best" have lost a ton of money attempting to time the market.

I didn't say anything about trying to "time" the market. What I was
saying is the first rule of investing is "don't lose money." If you
own shares in a certain company and you see that the shares have been
progressively trending downward over a certain period of time and have
now fallen over 10% with no end in sight, I think it might be a good
idea to think about selling those shares to cut your losses. If my
shares in Company ABC have gone up 50% since I bought them and now
have gone down 20%, that may not be a 20% loss on my original
investment, but it sure is a 20% loss on my profit. If I had sold when
the shares were down only 10%, I would have preserved more of my
profit.

>
> That you lost a little from what you gained on your investment (Even going from a 10% loss to a 20% loss) because you stayed with a good thing for too long is not that big of a deal.

The shares didn't fall 20% overnight. It was over an extended time
frame. The reason it happened was because I was buying and selling
shares through a local stockbroker at the time, and his commission was
$65 per transaction, so a person thinks very hard before spending
$130, especially because it wasn't as if I was investing thousands of
dollars at a time. Also, I wasn't following my stocks on line on a
regular basis. Now, I use an online broker, which is a $10
commission, and not only can I follow my investments every day but I
can read analyses and all kinds of information on line about any
company any time I want.

In the olden days of dealing with a local broker, I was operating
blindly. Yes, I could go online and see that shares of Teva went up
or down a half a point today, but I had held Teva for about 10 years
and didn't remember how many shares I had, what I originally paid for
them, what they were worth last year, last month, last week, etc. I
would get a monthly paper statement in the mail, and I was going by
that, and it showed my original investment and how much the shares had
gone up or down since the previous statement. For me, it was hard to
get the big picture. With online trading, in 2 seconds, I can see the
activity (of the share prices) from the day the company went public. I
can go back 1 day, 5 days, 6 months, 10 years, whatever I want.

>Consider how well you did over the entire time you invested in it.

Yes, but I can guarantee you that if I owned Teva today, I would have
a trailing stop on it to automatically sell if the stock ever lost 10%
off its highest value (since I owned it). I have trailing stops on all
my investments. It's a way to cut losses. In fact, the IBD (Investors
Business Daily) advises that if a stock drops 7 or 8% (I think they
used to say 11%), sell it no matter what (to cut losses). To me, this
is a way to avoid risk, not incur more risk. The worst thing that can
happen is that the stock will subsequently rise a significant amount,
and the investor will lose out on greater profit. There are plenty of
ways to engage in high risk behavior in the stock market, but this is
not one of them.
>
> I actually wrote a lot more, but I have since deleted it since I am afraid it was too complicated and is not really the topic of this group.

Well, I hope this post isn't rejected, as traffic on SCJM has been
very slow (I haven't had as much time to participate), so it's nice to
have something interesting to discuss, even if the Jewish content
involved is rather limited.
Best regards,
---Cindy S.

David Makowsky

4/5/2013 2:42:00 PM

0

On Thursday, April 4, 2013 11:37:16 PM UTC-5, cindys wrote:

I snipped much from this. I only included the parts I want to comment on. Again I could say a lot more but that is well beyond the scope of this group. Please send me an email if you are interested in discussing this further.

Please also note I am not an investment advisor. My knowledge comes from both my MBA and that I have worked in the financial industry for over 10 years.

> On Apr 4, 11:52 am, David Makowsky <dlmakow...@gmail.com> wrote:

> > Market timing (When to get in and out of an investment based on predicting when that investment will start/stop to go up or down at precise instant in time) is very risky and is something to stay away from unless you have the stomach for such risk and can afford to lose money.  There are few experts on market timing and I wouldn't believe most people who claim they are experts.  It is very difficult to nail down and many of the "best" have lost a ton of money attempting to time the market.

> I didn't say anything about trying to "time" the market.

The example you gave gave is typical of some examples used by academics and others when discussing market timing.

> What I was
> saying is the first rule of investing is "don't lose money."

While this may seem counter-intuitive, that is actually not correct.

There are only three ways to beat the market:

1) Get lucky
2) Do something illegal (including but not limited to obtaining and using inside information, committing fraud, manipulation)
3) Take risks

The first two are not something one should depend on. The third implies the very real possibility of losing money.

If you want to obtain returns consistent with the market you should invest in a market linked index fund. However you will lose money during any period in which the market loses money. That having been said I don't think (but I could be wrong) there has ever been a 20 year period over which the market lost money and such an investment is usually made by people wanting to conservatively invest for a long period of time

If you want to avoid risks (i.e. make sure you "don't lose money") you should invest in a "risk free asset" (There really is no such thing) such as US Treasury Bonds and Notes. However these returns will almost always be lower than the market.

Also, that a stock has consistently gone down (or up) does not increase the chances at all that it will continue to do so. The price of a stock is based on all of the currently available public information on that stock. If there is information available that could potentially impact on the price of the stock, that information has already been incorporated into the price of the stock. Only information not yet available could cause a stock to go up or down the next day regardless of what the stock might have "consistently" been doing up until then (There is much more to this, the details of which I don't want to go into here - There are also some exceptions to this and I don't want to get into those either).

mm

4/7/2013 4:29:00 AM

0

On Fri, 5 Apr 2013 04:37:16 +0000 (UTC), cindys
<cstein1@rochester.rr.com> wrote:

>
>Well, I hope this post isn't rejected, as traffic on SCJM has been
>very slow (I haven't had as much time to participate), so it's nice to
>have something interesting to discuss, even if the Jewish content
>involved is rather limited.

Making money is the essence of Jewish content. If you red SCJ and
other assorted antisemitic material, you'd know that.

>Best regards,
>---Cindy S.

;-)

--

Meir