Every time I open terminal, at the very top I see this error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named virtualenvwrapper.hook_loader
virtualenvwrapper.sh: There was a problem running the initialization hooks.
If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenv has been installed for
VIRTUALENVWRAPPER_PYTHON=/usr/bin/python and that PATH is
set properly.
I tried reinstalling virtualenvwrapper as well as sudo rm -rf venv
Looks a whole lot like this (solved) question:
Python Virtualenv - No module named virtualenvwrapper.hook_loader
Does that help?
Related
I have Python 3.11 and I have done everything expect Anaconda thing in this video below to try and fix this issue.
https://www.youtube.com/watch?v=RvbUqf3Tb1s&t=181s&ab_channel=TechWithTim
Here is the error:
C:\Python311\python.exe
C:\Users\16789\PycharmProjects\cyberNewsfeed\main.py Traceback (most
recent call last): File
"C:\Users\16789\PycharmProjects\cyberNewsfeed\main.py", line 1, in
import feedparser ModuleNotFoundError: No module named 'feedparser'
Attached is a screenshot of my interpeter and structue.
Tried everything in the linked video besides anaconda and i was expecting it to run. I restarted my computer as well.
You have to install the missing package. Try this in a shell inside your python environment.
pip install feedparser
The script runs fine from pycharm but can't see my my lib
-> site-packages when ran as a shell script. I've set my PYTHONPATH variable and added it to path as %PYTHONPATH% but no luck. I've checked bashrc and can't see the environment variable being overwritten. Maybe my structure is incorrect?
-lib
- site-packages
-scripts
-src
- monroes_events.py
**Error:**
(venv) C:\Users\James\repos\web_scraper\src>bash web_scraper_setup.sh
python3 Monroes_Scraper.py
Traceback (most recent call last):
File "Monroes_Scraper.py", line 5, in <module>
import pandas as pd
ModuleNotFoundError: No module named 'pandas
Install pandas module using pip install pandas which is required to run the Monroes_Scraper.py
You can find more detail here
Recently, when I use pip to install python modules, I will get an error saying that the module has not been downloaded when I run it in the IDLE. However, when I run the same script in the terminal, it works fine. What is this error and how can I solve it?
Traceback (most recent call last):
File "<pyshell#8>", line 1, in <module>
import gspread
ModuleNotFoundError: No module named 'gspread'
Probably you have different versions of python installed.
The version you used pip to install new modules is different from the version you access with IDLE.
So I am using pip through conda to install packages for python3. One package in particular, called keyboard i am running into issues with.
Specifically, If I write:
>import keyboard
>keyboard.wait('s')
I run into: ImportError: You must be root to use this library on linux.
However, if i try to run it with admin privelages opening python3 with: sudo python3 I run into the problem:
> import keyboard
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'keyboard'
Somehow the package is not recognised anymore. what is happening?
I am running python 2.7 on ubuntu 12.04. I did pip install tornado in a virtual environment and python reports that it was a successful installation. But when I run the code in the file tserver.py I get the following error:
(venv)$ python tserver.py
Traceback (most recent call last):
File "tserver.py", line 1, in <module>
from tornado.wsgi import WSGIContainer
ImportError: No module named tornado.wsgi
I found this question describing a very similar problem Python Tornado: WSGI module missing? -- but my file is not called tornado.py so the answer does not help me.
Had you named the server file initially as tornado.py ? because, I had and even after changing i still got that error.
I fixed it after I did a sudo pip install tornado --upgrade
After this i closed the terminal and restarted it. Then, in the python interpreter i tried import tornado and the error was gone.
Also also remove any tornado.pyc or tornado.py file in the directory where your application is present