Jump to content

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


Recommended Posts

Posted (edited)

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
Posted

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.

Posted
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.

Posted

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.

 

 

Posted

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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

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.