How to install whois python module in windows - python

I want to install whois python module in windows.
i tried to install whois module using command
python setup.py install
downlaoded from
https://pypi.python.org/pypi/pythonwhois
but when i try to import whois module it gives error
>>> import whois
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import whois
ImportError: No module named whois
thanx in advance

I would suggest that you should install pip first.
http://docs.python-guide.org/en/latest/starting/install/win/
OR
How do I install pip on Windows?
After that go to command prompt and simply type:
pip install whois
This should do it.
Update: Alternate way to install whois?
Step 1: After installing pyhton, add the following to the PATH in the Environmental Variables.
C:\Python27\;C:\Python27\Scripts\
Step 2: Download ez_setup.py. Run it and it will install Setuptools.
Step 3: Go to command line/powershell and type:
easy_install whois
Step 4: You are done! Go to python and import whois

try using pip - http://pip.readthedocs.org/en/latest/installing.html, download the file, run the script and then you can do like this - http://www.pythonforbeginners.com/dns/using-pywhois, pip install python-whois.

Related

ModuleNotFoundError: No module named 'cryptography'

these are the Error messages I am geeting on running any of my project modules.
Traceback (most recent call last):
File "C:\Users\hsnl\BlockchainCodesTutor\Wallet.py", line 3, in <module>
import Transactions
File "C:\Users\hsnl\BlockchainCodesTutor\Transactions.py", line 2, in <module>
import Signatures
File "C:\Users\hsnl\BlockchainCodesTutor\Signatures.py", line 2, in <module>
import cryptography
ModuleNotFoundError: No module named 'cryptography'
I have already installed the cryptography module and was working perfectly until today I start getting this message that " No module named 'cryptography'".
I have again installed the cryptography as well as pip package but still showing the same error.
There might be loose versions running on your system. Please try the following:
python -m pip uninstall cryptography
python -m pip install cryptography
You can also check out this with python -m to make sure you are not using a loose pip.
You might not have cryptogtaphy installed correctly. I see you are using windows. Open commandline as an administrator and run pip install cryptography again. Enshure that the installation finishes without any errors and consider to restart your python interpreter after installation.
For further help you should post more details like the output of pip and your code leading to the error, so a more detailed answer for your problem can be given.
Try download cryptography whl from here.
Then use pip install cryptography-XXX.whl
For example:
pip install cryptography-3.3.1-cp36-abi3-win_amd64.whl
And now just supports python2.7 and python3.6.

Python 3.7 ModuleNotFound

I'm using MSYS2 but without pip (SSL error), and when I try to run
python vin.py
It throws me this error:
Traceback (most recent call last):
File "vin.py", line 1, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
What can I do? Thanks in advance
I think it is because you installed the requests module for Python 3 while you are running Python 2.
To specifically install the package for Python 2, try entering this command:
pip2 install requests
or
python -m pip install requests
If you want to run the script with Python 3 instead, simply change python to python3, so:
python3 vin.py
It is better to use a virtualenv:
First create a virtualenv for your project and activate it:
python -m venv my_project
source my_project/bin/activate
Then install Requests:
pip install requests
To test: run python and import requests
>>> import requests

ModuleNotFoundError after installing requests package

I am on Mac OS Sierra, with home-brew, pip and python3 installed. I Tried running a script that required the requests module, but I keep getting this error:
Traceback (most recent call last):
File "listing_seq.py", line 1, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
Despite running:
sudo pip3 install requests
sudo pip install requests
sudo pip install requests --upgrade
Any suggestions?
Update:
When I try running using virtualenv I get:
Running virtualenv with interpreter /usr/local/bin/python3
ERROR: File already exists and is not a directory.
Please provide a different path or delete the file.
The most common error is having another file with the name of any of the libraries you requested in the same path.
The other possible error is if the python you are using to execute the file is not python 3 but rather the defalut python from your OSX. See the accepted answer on this for better understanding of a possible issue. Also share your code to identify the bug.

Unable to import owlready in Python

I am trying to use the owlready library in Python. I downloaded the file from link(https://pypi.python.org/pypi/Owlready) but when I am importing owlready I am getting following error:
>>> from owlready import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'owlready'
I tried running:
pip install owlready
I am get the error:
error: could not create '/usr/local/lib/python3.4/dist-packages/owlready': Permission denied
Try installing it using pip instead.
Run the command pip install <module name here> to do so. If you are using python3, run pip3 install <module name here>.
If neither of these work you may also try:
python -m pip install <module name here>
or
python3 -m pip install <module name here>
If you don't yet have pip, you should probably get it. Very commonly used python package manager. Here are some details on how to set the tool up.
You need installed library:
C:\PythonX.X\Scripts
pip install owlready
Successfully installed Owlready-0.3

ImportError: cannot import name 'VideoCapture'

I'm writing a quick Python script that uses VideoCapture. At the start of the script, I have this:
from skvideo.io import VideoCapture
When I run the script, I get:
Traceback (most recent call last):
File "getVids.py", line 4, in <module>
from skvideo.io import VideoCapture
ImportError: cannot import name 'VideoCapture'
When I run:
pip3 install skvideo
I get:
Collecting skvideo
Could not find a version that satisfies the requirement skvideo (from versions: )
No matching distribution found for skvideo
Any idea how to fix / where to go from here?
Thanks!
The pip package providing this python module/package is call sk-video.
pip3 install sk-video
You should try
sudo pip install sk-video
as suggested in their installation guide. http://www.scikit-video.org/stable/
This smells like an environment variable problem. You shouldn't need sudo or administrator privileges to do this.
First, make sure that you run your script inside a virtual environment:
Create a Virtualenv: virtualenv my_env
Activate it: source my_env/bin/activate
Install your requirements: pip install sk-video
Run your script: python getVids.py

Categories