when trying to run and app today, instead of it running I had some errors thrown.
Usually when I've had errors w/ python I can set new PATH or something and it works again. But this time nothing I've tried works.
The app still works on my other computer, running the same OS.
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts\snscrape.exe\__main__.py", line 4, in <module>
ModuleNotFoundError: No module named 'snscrape'
Try:
pip3.10 install snscrape
ModuleNotFoundError: No module named 'snscrape' implies one of the following:
You don't have this module installed
Don't have it installed on your specific Python version
It can't be found
Related
I want to create a new poetry environment for my poetry project because I deleted the one I had:
But I have the following error:
Here is the command output:
Traceback (most recent call last):
File "C:\Users\lhott\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\lhott\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\lhott\AppData\Roaming\Python\Scripts\poetry.exe\__main__.py", line 4, in <module>
ImportError: cannot import name 'main' from 'poetry.console' (C:\Users\lhott\AppData\Roaming\pypoetry\venv\lib\site-packages\poetry\console\__init__.py)
Uninstalling poetry and re-installing it with:
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py -
solved the problem.
I'm new to python and when I tried to update pip in cmd this appeared:
Traceback (most recent call last):
File "d:\pytong\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "d:\pytong\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "D:\pytong\Scripts\pip.exe\__main__.py", line 4, in <module>
ModuleNotFoundError: No module named
Now it pops up anytime I'm trying to do anything.
I think your best option is to reinstall python or follow this - How to completely remove Python from a Windows machine?
After that restart your PC and install python from python webiste.
it my first time using streamlit, i have installed sreamlit using pip install streamlit which it installed. itry running a python file using streamlit run pop.py it gives me this error below :
C:\Users\DELL>streamlit run pop.py
Traceback (most recent call last):
File "c:\users\dell\appdata\local\programs\python\python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\dell\appdata\local\programs\python\python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\DELL\AppData\Local\Programs\Python\Python39\Scripts\streamlit.exe\__main__.py", line 4, in <module>
ModuleNotFoundError: No module named 'streamlit.cli'; 'streamlit' is not a package
i don't know what to do. please help
You are using it in Python. After opening the cmd, do not write python. Just go to the folder and write streamlit run pop.py in cmd. Not in Python.
I updated Python to version 4.2 with Anaconda Navigator. I am kind of new to programming, but I have an error in the console. It says "An error ocurred while starting the kernel" and than the following:
Traceback (most recent call last):
File "C:\Users\anass\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\anass\Anaconda3\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\anass\Anaconda3\lib\site‑packages\spyder_kernels\console\__main__.py", line 23, in
start.main()
File "C:\Users\anass\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 253, in main
import_spydercustomize()
File "C:\Users\anass\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 43, in import_spydercustomize
import spydercustomize
File "C:\Users\anass\Anaconda3\lib\site‑packages\spyder_kernels\customize\spydercustomize.py", line 31, in
from spyder_kernels.customize.spyderpdb import SpyderPdb
File "C:\Users\anass\Anaconda3\lib\site‑packages\spyder_kernels\customize\spyderpdb.py", line 23, in
from IPython.core.inputtransformer2 import TransformerManager
ModuleNotFoundError: No module named 'IPython.core.inputtransformer2'
What should I do to fix this?
When I open Spyder, it says (Python 3.6). Is that maybe part of the problem? Thanks in advance!
(Spyder maintainer here) Please open the Anaconda Prompt and run there
conda update anaconda
conda install ipython=7.6.0
That should fix your problem.
Every time I open a new shell, I get this error:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/runpy.py", line 170, in _run_module_as_main
"__main__", mod_spec)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/virtualenvwrapper/hook_loader.py", line 223, in <module>
main()
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/virtualenvwrapper/hook_loader.py", line 132, in main
run_hooks(hook, options, args)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/virtualenvwrapper/hook_loader.py", line 161, in run_hooks
hook_mgr = ExtensionManager(namespace)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/stevedore/extension.py", line 106, in __init__
verify_requirements)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/stevedore/extension.py", line 179, in _load_plugins
for ep in self.list_entry_points():
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/stevedore/extension.py", line 168, in list_entry_points
eps = list(pkg_resources.iter_entry_points(self.namespace))
AttributeError: module 'pkg_resources' has no attribute 'iter_entry_points'
virtualenvwrapper.sh: There was a problem running the initialization hooks.
If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenvwrapper has been installed for
VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3.5 and that PATH is
set properly.
Oddly enough, virtualenvwrapper is still working fine. If I try to activate a virtualenv, it spits out this error again, but the environment does load up. This was after I recently tried to clean up my Python versions on my Mac, but I clearly messed up some path.
Let me know if more info is needed.