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
Related
I need to install python wrapper for StanfordCoreNLP.
I have used git clone https://github.com/smilli/py-corenlp and also pip install pycorenlp and its showing success in both the cases, but when I run from pycorenlp import StanfordCoreNLP, its showing ModuleNotFoundError.
I checked its path if it installed or not. It is installed at "C:\Users\simra_000\Anaconda3\Lib\site-packages\pycorenlp" using pip
and using git clone also it is installed at "C:\Users\simra_000\py-corenlp"
from pycorenlp import StanfordCoreNLP
Traceback (most recent call last): File "", line 1, in
ModuleNotFoundError: No module named 'pycorenlp'
check if the module was installed by:
pip list
also you can add this code to install the module if it's not installed:
import pip
required_pkgs = ['pycorenlp']
installed_pkgs = [pkg.key for pkg in pip.get_installed_distributions()]
for package in required_pkgs:
if package not in installed_pkgs:
with suppress_stdout():
pip.main(['install', package])
also check the version of python that you are used to run the script and the version of pip, for example if you are using python3 and you install the module via pip (python2) the module was installed for python v.2 only
otherwise check the name of your script, so if the name of your script is pycorenlp.py the import will not work, and you need to change the name of your script
hope that helps you
I have been trying to install numpy for Python 2.7.12 on a ubuntu 16.04 machine, but am not sure I am doing the right thing.
I issued the command
python setup.py install
and received the following error message:
ImportError: No module named Cython.Compiler.Main
So I have also been trying to install the cython package and received another error message:
/Cython-0.28.1/Cython/Plex/Scanners.c:19:20: fatal error: Python.h: No such file or directory
I thought this problem required me to install cpython. Trying to install this resulted in the following error message:
Traceback (most recent call last):
File "setup.py", line 4, in <module>
import sys, os, importlib.machinery, re, optparse
ImportError: No module named machinery
I am somewhat stumped about how to continue. Am I on the right path? Is there a different way I could try (the computer in question cannot connect to the internet)?
You can check if pip is install thanks to the command which pip,
in my case :
$ which pip
/home/usr1/anaconda3/bin/pip
If pip is not install install it : instruction here
then you should be able to use it such as :
pip install numpy
an alternative is to use : conda install
In the terminal use:
pip install numpy
If you get any error like 'permission denied', try:
sudo pip install numpy
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.
I am getting the following error while using python with T7 labjacks.
from labjack import ljm
# Open first found LabJack
handle = ljm.openS("ANY", "ANY", "ANY")
# Call eReadName to read the serial number from the LabJack.
name = "SERIAL_NUMBER"
result = ljm.eReadName(handle, name)
Error is:
Traceback (most recent call last):
File "testLJ.py", line 1, in <module>
from labjack import ljm
ImportError: No module named labjack
As documented on Labjack - Python for LJM - Windows, Mac, Linux:
Instructions
Install the LJM Python modules with pip, which is
commonly installed with Python, using the following command:
python -m pip install labjack-ljm
or:
pip install labjack-ljm
Troubleshooting
If you get the following error:
ImportError: No module named labjack
Make sure you install for the Python version you will be using. For
example, on Linux if both Python 2.7 and 3.5 are installed, you can
install to Python 3.5 with:
$ python3.5 -m pip labjack-ljm install
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.