I'm running a Python script on my server using a cron job:
/usr/bin/python/home/JohnDoe/scripts/Sample.py
I get an error saying
Traceback (most recent call last):
File "/home/JohnDoe/scripts/Sample.py", line 2, in <module>
import gspread
ImportError: No module named gspread\
Is there an easy way to run my third-party modules?
Related
I have been having problems with running the samlapi.py script detailed on this page:
https://aws.amazon.com/blogs/security/how-to-implement-federated-api-and-cli-access-using-saml-2-0-and-ad-fs/
I am following everything correctly, but I continue to run into errors such as this:
Traceback (most recent call last): File "./samlapi.py", line 6, in <module> import boto.sts ModuleNotFoundError: No module named 'boto.sts'
Even though I DID install boto.
As well as...
Traceback (most recent call last): File "/Users/chrisroarke/samlapi.py", line 8, in <module> import requests ModuleNotFoundError: No module named 'requests'
Even though I DID install requests-ntlm.
I am following the instructions on this article and continue to run into these issues. Very frustrating. I am on MacOS, running Big Sur, Python3.9, have installed 'beautiful soup' as well as 'requests-ntlm' as instructed; I just don't know why it cannot seem to find these modules.
If anyone out there has run into this issue and has a potential solution to propose I'm all ears and would greatly appreciate it!
Cheers - Chris
I have a startup code to use gingerit on python. Gingerit is by far the most enhanced and the best grammar tool available on python. When I try running the code I have, I started receiving a traceback error.I am currently using 3.7 and the code I used is present on the official gingerit documentation.
text = 'it is there problem'
parser = GingerIt()
parser.parse(text)
I expected to not have any errors on this but there was a traceback error.
Traceback (most recent call last):
File "C:/Users/sid071/Desktop/gingerit.py", line 1, in <module>
from gingerit.gingerit import GingerIt
File "C:/Users/sid071/Desktop\gingerit.py", line 1, in <module>
from gingerit.gingerit import GingerIt
ModuleNotFoundError: No module named 'gingerit.gingerit'; 'gingerit' is not a package
Your script is called gingerit, which is hiding the package you installed. Rename your script to something else.
I am fairly new to working with RocksDB. I have set up the environment for RocksDB following the link here, but when I run a sample Python script having import rocksdb it says:
Traceback (most recent call last):
File "`<string>`", line 1, in <module>
ModuleNotFoundError: No module named 'rocksdb'
Can anybody suggest a solution to this issue?
I installed third party module and its egg file was created in following path
D:\Utkarsh\Lib\site-packages
I am not getting error while importing module in IDLE in following way
import snakebite
When i am importing the same in HDFS.py file having following lines
import snakebite
from snakebite.client import Client
client = Client('localhost', 9000)
it causes following stack error:
============ RESTART: D:/Utkarsh/Python Projects/HDFS.py ============
Traceback (most recent call last):
File "D:/Utkarsh/Python Projects/HDFS.py", line 1, in <module>
import snakebite
ModuleNotFoundError: No module named 'snakebite'
sys.path had following values:
D:/Utkarsh/Python Projects
D:\Utkarsh\Installation\Lib\idlelib
D:\Utkarsh\Installation\python36.zip
D:\Utkarsh\Installation\DLLs
D:\Utkarsh\Installation\lib
D:\Utkarsh\Installation
D:\Utkarsh\Installation\lib\site-packages
Being newbie,can anybody help me in knowing exact cause of it.
I need to execute this python script: http://superjared.com/static/code/googleMX.py
I installed pyactiveresource, but when I executed it: python googleMX.py I had this response.
Traceback (most recent call last):
File "googleMX.py", line 15, in ?
from pyactiveresource import ActiveResource
ImportError: cannot import name ActiveResource
by Responding myself...
It was using an older version of pyactiveresource. The author (Lucky) creates another one http://gist.github.com/330832