Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

pythonOCC examples doesn't work?

133 views
Skip to first unread message
Message has been deleted

Jayden

unread,
Sep 12, 2012, 12:02:14 AM9/12/12
to
I installed
(1) pythonxy2.7.2.3 (with python2.7) and
(2) pythonOCC-0.5-all-in-one.win32.py26
on windows 7 64 bit computer.

I try run pythonOCC examples in its example folder, such as the helloworld.py and got errors as follows:

ImportantError: DLL load failed: The specified module could not be found.

The error come from the line of code:

from OCC.BrepPrimAPI import *

How to fix the error? Thanks a lot!!

Marco Nawijn

unread,
Sep 12, 2012, 12:42:21 AM9/12/12
to
Hi Jayden,

It has been some time ago that I used PythonOCC and I used it on Linux, so I cannot be of much help here. It sounds like you have to tell Windows where to look for the installed libraries (environment variables?). Anyhow, I recommend to post the question to the PythonOCC mailinglist. They are quite responsive.

One last suggestion. OCC itself comes with a small utility called DRAWEXE. It is a tcl/tk program that can be used to play around with a lot of the functionality provided by OCC.

Good luck!

Marco
Message has been deleted

Mark Lawrence

unread,
Sep 12, 2012, 2:41:33 AM9/12/12
to pytho...@python.org
On 12/09/2012 05:02, Jayden wrote:
> I installed
> (1) pythonxy2.7.2.3 (with python2.7) and
> (2) pythonOCC-0.5-all-in-one.win32.py26

Can you safely mix these?

> on windows 7 64 bit computer.
>
> I try run pythonOCC examples in its example folder, such as the helloworld.py and got errors as follows:
>
> ImportantError: DLL load failed: The specified module could not be found.
>
> The error come from the line of code:
>
> from OCC.BrepPrimAPI import *
>
> How to fix the error? Thanks a lot!!
>

See above, I hope, I don't actually know :)

--
Cheers.

Mark Lawrence.

Mark Lawrence

unread,
Sep 12, 2012, 3:37:16 AM9/12/12
to pytho...@python.org
On 12/09/2012 08:19, Dwight Hutto wrote:
> So used to google, forgot to check the python docs:
>
> http://docs.python.org/faq/windows.html
>
> and this should be useful as well, which is from:
>
> http://stackoverflow.com/questions/5030362/how-to-use-opencv-in-python
>
> "I suspect you have the same problem I've run into. If you have a 64-bit
> version of Python, it cannot load 32-bit DLLs. OpenCV currently only ships
> 32-bit binaries. If you want 64-bit .pyd and .dll files, you have to
> compile them yourself. There are some
> instructions<http://opencv.willowgarage.com/wiki/VisualC%2B%2B>on the
> OpenCV Wiki, but it's not for the faint of heart. Expect to have a
> substantial time investment.
>
> The easiest solution is to:
>
> 1. Uninstall 64-bit Python
> 2. Install a 32-bit distribution.
>
> The PythonXY distribution includes pyopencv -- a good set of OpenCV hooks.
> The only limitation is that it's 32-bit, so don't make plans to process
> gigapixel astronomy data with it! ;)
>
> If you *must* have the 64-bit version, follow these
> instructions<http://redkiing.wordpress.com/2010/10/03/opencv-and-visual-studio-2010-with-cmake/>to
> get it OpenCV to compile with Visual Studio 2010. There's a discussion
> on stackoverflow that describes building 64-bit apps with VC Express."
>
>
> And again, check on the pywin mailing list
>
>

All very impressive, but as Dennis Lee Bieber has pointed out and which
I suspected there is a binary incompatibility between the OP's Python
version and pythonOCC version. Others would be able to see this for
themselves but you insist on sending email without context. Please
don't do this.


--
Cheers.

Mark Lawrence.

Dwight Hutto

unread,
Sep 12, 2012, 4:12:32 AM9/12/12
to Mark Lawrence, pytho...@python.org
DIdn't see this, I was too busy helping the OP search for an answer,
and educate us both at the same time.

Others would be able to see this for themselves but
> you insist on sending email without context. Please don't do this.


How are my emails without context? I'm referring the OP to the docs,
as well as posts related to their question. It goes to use google, and
RTFM, and putting it politely to them.

I could summarize, but they have to do the real reading. I'm not
researching this, and if I was, I'd charge for the time. This is to
show that things can get complex if you don't use google, or read the
docs.

Why does the OP keep asking here, when there are answers out there.
especially on the pywin list, which Windows users are usually referred
to.

Please point out what's out of context. The links and references place
it into context if the OP finds them useful, and I believe I searched
well for them.

Would the OP like to tell me I wasn't helpful? Because now they're
probably on a search to figure out how to make these compatible, which
means more questions, and more reading.

Plus the OP said he's on 64. Read the quote from stackoverflow:


"I suspect you have the same problem I've run into. If you have a 64-bit
version of Python, it cannot load 32-bit DLLs. OpenCV currently only ships
32-bit binaries. If you want 64-bit .pyd and .dll files, you have to
compile them yourself. "

A different program, but roughly the same in analogy, I do believe.

And where in here was the OP referenced to the python docs on windows:

>> http://docs.python.org/faq/windows.html

Was that out of context as well?

Let's not argue about this, I was pointing them to what I saw as the
best possible resources to overcome his current problem, and it was
all in context of the conversation as far as I'm concerned.

--
Best Regards,
David Hutto
CEO: http://www.hitwebdevelopment.com

jelle

unread,
Sep 12, 2012, 11:12:55 AM9/12/12
to
You installed python 2.7 and expect a 2.6 module to work with it.
That won't work. Finally, you need to install the OpenCasCade libs to be able to run PythonOCC.

-jelle

Jayden

unread,
Sep 12, 2012, 1:03:31 PM9/12/12
to
I think that is the reason. Thanks a lot!!

Terry Reedy

unread,
Sep 12, 2012, 4:58:18 PM9/12/12
to pytho...@python.org
> On 12/09/2012 08:19, Dwight Hutto wrote:

>> The easiest solution is to:
>>
>> 1. Uninstall 64-bit Python

No need to do this, at least not on windows.

>> 2. Install a 32-bit distribution.

in a separate directory. I have had both on my win7 machine so I could
run (test) python code on both. One can put python-code-dir.pth in the
site-packages directories of both.

--
Terry Jan Reedy

Prasad, Ramit

unread,
Sep 13, 2012, 7:26:12 PM9/13/12
to pytho...@python.org
Dwight Hutto wrote:

[snip]

> On Wed, Sep 12, 2012 at 3:37 AM, Mark Lawrence <bream...@yahoo.co.uk>
> wrote:

[snip]

> Others would be able to see this for themselves but
> > you insist on sending email without context. Please don't do this.
>
> How are my emails without context? I'm referring the OP to the docs,
> as well as posts related to their question. It goes to use google, and
> RTFM, and putting it politely to them.
>


I have noticed that you do not always quote what you are talking about.
Sometimes I can guess or look at another message and see what you
are talking about, but not always. This list philosophy seems to be
"quote what is relevant and trim what is not". Not on a
"go lookup the previous message to find context".

> I could summarize, but they have to do the real reading. I'm not
> researching this, and if I was, I'd charge for the time. This is to
> show that things can get complex if you don't use google, or read the
> docs.


Context is not the same as explaining absolutely everything.
It means that I, the reader, can see *what* you are talking about
and what you are responding *to*.

I do agree with the stance not to spoon feed OP(s).

>
> Why does the OP keep asking here, when there are answers out there.
> especially on the pywin list, which Windows users are usually referred
> to.

I was not aware that Windows users were "usually" referred anywhere.
Most referrals are on a case-by-case basis as many problems or
questions from Windows Python developers are Python questions and
not specific to pywin.

>
> Please point out what's out of context. The links and references place
> it into context if the OP finds them useful, and I believe I searched
> well for them.
>
> Would the OP like to tell me I wasn't helpful? Because now they're
> probably on a search to figure out how to make these compatible, which
> means more questions, and more reading.

Nobody is claiming you are not helpful. I appreciate your effort,
I just do not always know what is going on in a thread especially
if I see the thread jump to something I can contribute to but now have
no context with which to help. Not to mention that the archive for
this list is searchable. Your answer is much more useful for future
searchers if you leave some context for someone reading this.

[snip]

>
> Let's not argue about this, I was pointing them to what I saw as the
> best possible resources to overcome his current problem, and it was
> all in context of the conversation as far as I'm concerned.
>

It is in context of the "thread", but the context of the
"conversation" was lost.


This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.

Dwight Hutto

unread,
Sep 13, 2012, 9:14:28 PM9/13/12
to nature"Prasad, Ramit", pytho...@python.org
On Thu, Sep 13, 2012 at 9:11 PM, Dwight Hutto <dwight...@gmail.com> wrote:
>>> especiThey would still need to process transactions like cash while offline, and they would also need access to their inventory.ally on the pywin list, which Windows users are usually referred
>> --
>> http://mail.python.org/mailman/listinfo/python-list
>
> Your point is taken. Most of the time, if it's in an in line response
> I would write the email line by line, with the referenced text shown
> above my response.
>
> However, when it seems like a conversation, I just trim the above, and
> respond. That's how I view an e-mail, like an ongoing conversation.
>
> From now on, I'll leave the mailing I'm responding to above, and
> delete the point's I'm not talking about, which is about what I
> usually do.
>
> So being attacked about no context(which was an attack out of context,
> based on a few messages one night), when the whole conversation is in
> the topic reader/gmail/etc seemed a little ignorant to reading
> through. All he had to do was look back up to the email s just above
> my response, and see, or read just through mine, not read everyone.
>
> But anyway, I'll be more informative as to exactly what I was
> referencing, instead of treating it like an ongoing conversation where
> everyone was present, and paying attention to the whole of the topic.
>
>
> --
> Best Regards,
> David Hutto
> CEO: http://www.hitwebdevelopment.com

And if you look at the above in gmail, you can see the ...'s that when
not clicked, won't show some of the responses I leave just above, and
it clips my signature line as well.

Dwight Hutto

unread,
Sep 13, 2012, 9:11:58 PM9/13/12
to Prasad, Ramit, pytho...@python.org
Message has been deleted

Chris Angelico

unread,
Sep 14, 2012, 3:30:26 AM9/14/12
to pytho...@python.org
On Fri, Sep 14, 2012 at 11:14 AM, Dwight Hutto <dwight...@gmail.com> wrote:
> [over a hundred quoted lines snipped]
> And if you look at the above in gmail, you can see the ...'s that when
> not clicked, won't show some of the responses I leave just above, and
> it clips my signature line as well.

That's a Gmail feature, and a sop to people who can't take a moment to
trim quoted text. Taking your above post as an example, there were
(according to my calculation) 111 lines of text that had already been
sent, being _re_sent in your post.

Not everyone uses Gmail. And not everyone runs off 100Mbit internet
connections. And even if everyone were to use Gmail off 100Mbit
internet connections, I would still recommend trimming the text,
because Gmail gives you precisely two options: all the way collapsed,
or all the way expanded. If I want to read more context, I get _all_
the context. That's still not all that useful.

Right while you make a post is the best time to decide how much
context is needed. Spend just a few seconds thinking about how much to
trim, and you can make things easier for everyone who reads your post,
whether it be on python-list, comp.lang.python, or one of several
web-accessible archives. And remember, this is for posterity, so be
honest. How do you feel? Interesting...

ChrisA

Dwight Hutto

unread,
Sep 14, 2012, 3:49:40 AM9/14/12
to Chris Angelico, pytho...@python.org
> honest. How do you feel? Interesting...
>
Um, I guess like an inconsiderate bandwidth hog, but from now on I'll
trim more text.

First it was too little, and now it's too much.

I just tend to cut out some or all depending on the scope of the conversation.

If I just hit reply all, and send it out, it's not intentionally to
use all of the text, and utilize the extra space, it's just a
response.

If the conversation is kind of just a few people, then I trim pretty
much everything, which apparently set a guy name mark off, who I was
polite to, but I'm not going to get slammed for a few simple posting
mistakes, and more than likely a few of his aliases, or the group he
tends to cheer up with.

It's just a mailing list, lighten up because mistakes in posting will
happen, even by accident.

Chris Angelico

unread,
Sep 14, 2012, 4:15:53 AM9/14/12
to pytho...@python.org
On Fri, Sep 14, 2012 at 5:49 PM, Dwight Hutto <dwight...@gmail.com> wrote:
>> honest. How do you feel? Interesting...
>>
> Um, I guess like an inconsiderate bandwidth hog, but from now on I'll
> trim more text.

What you may have missed was that that was a quote from Princess
Bride. Don't take it personally :)

> First it was too little, and now it's too much.
>
> I just tend to cut out some or all depending on the scope of the conversation.
>
> If I just hit reply all, and send it out, it's not intentionally to
> use all of the text, and utilize the extra space, it's just a
> response.

It's all a question of courtesy, and there's no hard-and-fast rules.
But as a simple rule of thumb, assume that your post is going to be
read completely without any surrounding context; will it be
comprehensible?

> If the conversation is kind of just a few people, then I trim pretty
> much everything, which apparently set a guy name mark off, who I was
> polite to, but I'm not going to get slammed for a few simple posting
> mistakes, and more than likely a few of his aliases, or the group he
> tends to cheer up with.

There's actually no such thing as a conversation of just a few people,
on a big list like this. Sure, there may be only a few contributors,
but there are thousands - maybe millions - of readers.

You're not being slammed, though. What you're seeing is a community
doing its best to maintain itself. If we all sit silently, wishing our
hardest that everyone would quote nicely, cite nicely, post without
trolling, and be helpful, will it happen? (Those familiar with the
Bible may note a similarity with some comments in the epistle of
James.) There are two ways to ensure that the community upholds its
standards: Kicking out everyone who doesn't measure up, or explaining
to people and inviting them to participate. The first is a great way
to have a tiny community with no growth. The second... is what you're
seeing. :)

Of course, there's a third option, which is to simply ignore
everything and try to get on with life. That basically amounts to
kicking _yourself_ out of the community, because you'll quickly give
up on a forum in which everyone posts sloppily. And I'm sure you don't
want all the experts to do that, because you're then left with a
"blind leading the blind" mailing list... not particularly conducive
to good code!

> It's just a mailing list, lighten up because mistakes in posting will
> happen, even by accident.

Accidents are understandable, but getting defensive doesn't help :)
Generally, people don't speak up until there've been several similar
instances.

ChrisA

Prasad, Ramit

unread,
Sep 14, 2012, 6:51:01 PM9/14/12
to pytho...@python.org
Dwight Hutto wrote:
> Chris Angelico wrote:
> > honest. How do you feel? Interesting...
> >
> Um, I guess like an inconsiderate bandwidth hog, but from now on I'll
> trim more text.
>
> First it was too little, and now it's too much.

It is a fine line to walk and nobody does it perfectly all the time.
We just attempt our best.

> I just tend to cut out some or all depending on the scope of the conversation.
>
> If I just hit reply all, and send it out, it's not intentionally to
> use all of the text, and utilize the extra space, it's just a
> response.
>
> If the conversation is kind of just a few people, then I trim pretty
> much everything, which apparently set a guy name mark off, who I was
> polite to, but I'm not going to get slammed for a few simple posting
> mistakes, and more than likely a few of his aliases, or the group he
> tends to cheer up with.

Sorry, I did not mean to "slam" you by any means. I was just
notifying you of the list's commonly agreed upon etiquette and
requesting future posts to attempt to adhere to that.

>
> It's just a mailing list, lighten up because mistakes in posting will
> happen, even by accident.
>

It's just a mailing list, lighten up because a few people trying
to help improve your communication to the rest of the group
may come off unintentionally as being "slammed" by the community. :)

Dwight Hutto

unread,
Sep 14, 2012, 11:47:11 PM9/14/12
to Prasad, Ramit, pytho...@python.org
On Fri, Sep 14, 2012 at 6:51 PM, Prasad, Ramit
<ramit....@jpmorgan.com> wrote:
> Dwight Hutto wrote:
>> Chris Angelico wrote:
>> > honest. How do you feel? Interesting...
>> >
>> Um, I guess like an inconsiderate bandwidth hog, but from now on I'll
>> trim more text.
>>
>> First it was too little, and now it's too much.
>
> It is a fine line to walk and nobody does it perfectly all the time.
> We just attempt our best.
>python docs interpolation
>> I just tend to cut out some or all depending on the scope of the conversation.
>>
>> If I just hit reply all, and send it out, it's not intentionally topython docs interpolation
>> use all of the text, and utilize the extra space, it's just a
>> response.
>>
>> If the conversation is kind of just a few people, then I trim pretty
>> much everything, which apppython docs interpolationarently set a guy name mark off, who I was
>> polite to, but I'm not going to get slammed for a few simple posting
>> mistakes, and more than likely a few of his aliases, or the group he
>> tends to cheer up with.
>
> Sorry, I did not mean to "slam" you by any means. I was just
> notifying you of the list's commonly agreed upon etiquette and
> requesting future posts to attempt to adhere to that.
>
>>
>> It's just a mailing list, lighten up because mistakes in posting will
>> happen, even by accident.
>>
>
> It's just a mailing list, lighten up because a few people trying
> to help improve your communication to the rest of the group
> may come off unintentionally as being "slammed" by the community. :)
>
That's no problem, But some suported ad some opposed, it's a
democracy, but a dictatorship by the moderators. How much did I err in
their opinion of stating my opinion, in relation to the statistical
whole?

Chris Angelico

unread,
Sep 14, 2012, 11:53:37 PM9/14/12
to pytho...@python.org
On Sat, Sep 15, 2012 at 1:47 PM, Dwight Hutto <dwight...@gmail.com> wrote:
> That's no problem, But some suported ad some opposed, it's a
> democracy, but a dictatorship by the moderators. How much did I err in
> their opinion of stating my opinion, in relation to the statistical
> whole?

Actually, I've not seen any moderatorial action on this list. Savoynet
is as you describe, a monarchy whose head but seldom exercises power;
python-list/c.l.p is an anarchy - or, if you like, a true democracy.
Not a representative democracy where we all get to vote, but we all
individually have the power to kick someone out - it's called a
killfile. The more people you annoy, the more people won't hear you
any more.

ChrisA

Dwight Hutto

unread,
Sep 15, 2012, 12:40:41 AM9/15/12
to Chris Angelico, pytho...@python.org
On Fri, Sep 14, 2012 at 11:53 PM, Chris Angelico <ros...@gmail.com> wrote:
> On Sat, Sep 15, 2012 at 1:47 PM, Dwight Hutto <dwight...@gmail.com> wrote:
>> That's no problem, But some suported ad some opposed, it's a
>> democracy, but a dictatorship by the moderators. How much did I err in
>> their opinion of stating my opinion, in relation to the statistical
>> whole?
>
> Actually, I've not seen any moderatorial action on this list. Savoynet

Alan Gauld quotes, "Putting on my moderator's hat", sometimes.

> is as you describe, a monarchy whose head but seldom exercises power;

I think it's Rossenbom(or whoever the creator of the interpreter
written in C is), "who says benevolent dictator for life"

> python-list/c.l.p is an anarchy - or, if you like, a true democracy.

Both, depending on whether you're a freestylist, or a pythonista who
follows versions.

> Not a representative democracy where we all get to vote, but we all
> individually have the power to kick someone out

- it's called a
> killfile.

No, only the individual can killfile, then they miss the point of
someone they should be listening to, because they kill filed for
propaganda, and not an actual cause(to join a group).

The more people you annoy, the more people won't hear you
> any more.

Annoy, how, with truth and honesty, then go away, and kill file me
with the few who are ignorant of the fact I speak the truth.

MRAB

unread,
Sep 15, 2012, 1:26:27 PM9/15/12
to pytho...@python.org
On 2012-09-15 05:40, Dwight Hutto wrote:
> On Fri, Sep 14, 2012 at 11:53 PM, Chris Angelico <ros...@gmail.com> wrote:
>> On Sat, Sep 15, 2012 at 1:47 PM, Dwight Hutto <dwight...@gmail.com> wrote:
>>> That's no problem, But some suported ad some opposed, it's a
>>> democracy, but a dictatorship by the moderators. How much did I err in
>>> their opinion of stating my opinion, in relation to the statistical
>>> whole?
>>
>> Actually, I've not seen any moderatorial action on this list. Savoynet
>
> Alan Gauld quotes, "Putting on my moderator's hat", sometimes.
>
>> is as you describe, a monarchy whose head but seldom exercises power;
>
> I think it's Rossenbom(or whoever the creator of the interpreter
> written in C is), "who says benevolent dictator for life"
>
[snip]
You don't know the name of the BDFL? I'm appalled! :-)

Dwight Hutto

unread,
Sep 17, 2012, 2:44:32 AM9/17/12
to pytho...@python.org
>> Alan Gauld quotes, "Putting on my moderator's hat", sometimes.
>>
>>> is as you describe, a monarchy whose head but seldom exercises power;
>>
>>
>> I think it's Rossenbom(or whoever the creator of the interpreter
>> written in C is), "who says benevolent dictator for life"
>>
> [snip]
> You don't know the name of the BDFL? I'm appalled! :-)
>
I know plenty of BDFL's, including that one, but the mods are not the creator.

Peter Otten

unread,
Sep 17, 2012, 3:24:20 AM9/17/12
to pytho...@python.org
Dwight Hutto wrote:

>>> Alan Gauld quotes, "Putting on my moderator's hat", sometimes.
>>>
>>>> is as you describe, a monarchy whose head but seldom exercises power;
>>>
>>>
>>> I think it's Rossenbom(or whoever the creator of the interpreter
>>> written in C is), "who says benevolent dictator for life"
>>>
>> [snip]
>> You don't know the name of the BDFL? I'm appalled! :-)
>>
> I know plenty of BDFL's, including that one, but the mods are not the
> creator.

Cue

I kno' plenty o' nuttin',
And nuttin's plenty fo' me...

to the tune of Josh Kirschwein (or whoever wrote that Ernie and Tess opera)

0 new messages