Jump to content

Python pycharm project: how to solve no web3 using CDN link

Featured Replies

Hi,

I am trying to compile a python code on ubuntu 18.04:

from __future__ import print_function
from web3 import Web3, KeepAliveRPCProvider, IPCProvider
import argparse,subprocess,sys

At the end I am getting the error:

Quote

ModuleNotFoundError: No module named 'web3'

 

I found one post which says:

Quote

You can try to add the web3 script from a CDN like this: cdnjs.com/libraries/web3

Can the above hint help me to solve the web3 module not found error?

Please guide me how I can implement the above technique?

 

Zulfi.

 

Edited by zak100

 

 

Quote

Can the above hint help me to solve the web3 module not found error?

No it can't.

  • Author

Hi,

Thanks for your response. I can't install web3.js on my ubuntu machine. I am getting "1 severe vulnerability problem". Is there any way to solve this problem by directing the link of web3 to a python repository?

What is the meaning of  the post in my first message?

 

Zulfi.

Quote

I am getting "1 severe vulnerability problem".

Strange I didn't get any error when installing with python3 and pip.

image.png.6bb66f8295bcfb03b3fc810a7bae8329.png

Quote

What is the meaning of  the post in my first message?

That is a CDN for downloading JavaScript to run web3 on a webpage. Similar to jQuery you just need to use the <script> tag. But it won't be available to Python or NodeJS.

  • Author

Hi,

Sorry I don't mean web3.py.

<That is a CDN for downloading JavaScript to run web3 on a webpage. Similar to jQuery you just need to use the <script> tag. But it won't be available to Python or NodeJS.>

This is what I am talking about. By web3 I mean web3.nodejs. Its a javascript stuff.
Kindly look at my following are posts:

reddit web_js installation

 

reddit_Ubuntu

ethereum_stack exchange

 

Sorry nobody is able to solve my 1 severe vulnerability problem related web3.nodejs

Zulfi.

 

 

  • Author

Hi,

@Ghideon very good link. This can be useful for object oriented programming.

@fiveworlds: Thanks, you have solved my problem. Actually it was related to python. When I installed web3.py using pip command the "no web3 module error" went away.

 

Zulfi.

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.