1

I set up a private network on my computer and was running some codes written in Python using web3.py, until I faced ImportError:

ImportError: The 'pyparsing' package is required; normally this is bundled with this package so if you get this warning, consult the packager of your distribution.

This didn't happen in the beginning. I was running my codes and everything was running good, but today while playing around with eth_tester I faced this error, which looks more like common Python error. And from the time I first saw this error message I was unnable to run any of my codes, which were running normally before.


The error is invoked by this line:

import web3

I have these versions of modules in my PyCharm:

Pyparsing 2.2.0

Web3 3.11.1 

pip 9.0.1

  • I am using WIN7SP1
  • Codes are being launched from the Command-line interface
  • I tried to reinstall web3.py, pyparsing and eth_tester in case problem was in module, but it didn't help

When I try import pyparsing it says:

AttributeError: module 'copy' has no attribute 'copy'


Yes, I was thinking to ask this question on StackOverflow, because I still think that this is more of Python problem, but this error happens only when I use web3.py and not any other module. So the problem might be in web3.


I appreciate any suggestions and comments on how to solve this problem.

1 Answer 1

3

Make sure none of your other .py files are called copy.py or pyparsing.py. This sounds like an issue of mangle namespace.

1
  • 1
    copy.py was actually a problem in my case. Thank you @AdamY. Jan 3, 2018 at 1:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.