Wxpython installation failed - python-3.x

I'm trying to get wxpython to work with python3.7.0 (32)
I installed it using "pip install wxpython", so I assume that there no compatibility problems.
this is the result:
Traceback (most recent call last):
File "E:\Scratch\Test.py", line 9, in <module>
import wx
File "C:\Python37\wx\__init__.py", line 17, in <module>
from wx.core import *
File "C:\Python37\wx\core.py", line 12, in <module>
from ._core import *
ModuleNotFoundError: No module named 'wx._core'
Any help appreciated. Thanks.

Related

'Invalid syntax' error when importing torch (Linux)

I'm trying to install torch under miniconda and simple import torch gives me the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/vol/tcm17/username/miniconda3/lib/python3.8/site-packages/torch/__init__.py", line 779, in <module>
from .serialization import save, load
File "/vol/tcm17/username/miniconda3/lib/python3.8/site-packages/torch/serialization.py", line 18, in <module>
from typing_extensions import TypeAlias
File "/home/username/.local/lib/python3.8/site-packages/typing_extensions.py", line 880
if stripped_args
Interestingly, if I repeat import torch again the error message changes:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/vol/tcm17/username/miniconda3/lib/python3.8/site-packages/torch/__init__.py", line 249, in <module>
for name in dir(_C):
NameError: name '_C' is not defined
I'm not using notebooks, python version is 3.8.16, pytorch version is 1.13.1. Miniconda is installed in a local folder (it's a university server so I can only do it like this due to disk space restrictions), the server runs on Ubuntu.
What could possibly be the problem?
The only recommendation I found for similar problems is to install Cython but it didn't help.
Downgraded to python 3.6 and this somehow solved the problem.

Why does a DLL error appear when importing tensorflow?

I recently got a new 64-bit windows 10 and installed pycharm. The pycharm I am using is Python 3.8.
When I installed tensorflow by running the command line, it worked fine. However, when I imported on my pycharm file (i.e. import tensorflow as tf), it produced an error as such:
Traceback (most recent call last):
File "C:\Users\leode\anaconda3\envs\Science Fair\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 64, in <module>
from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed while importing _pywrap_tensorflow_internal: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/leode/PycharmProjects/Science Fair/project.py", line 1, in <module>
import tensorflow as tf
File "C:\Users\leode\anaconda3\envs\Science Fair\lib\site-packages\tensorflow\__init__.py", line 41, in <module>
from tensorflow.python.tools import module_util as _module_util
File "C:\Users\leode\anaconda3\envs\Science Fair\lib\site-packages\tensorflow\python\__init__.py", line 40, in <module>
from tensorflow.python.eager import context
File "C:\Users\leode\anaconda3\envs\Science Fair\lib\site-packages\tensorflow\python\eager\context.py", line 35, in <module>
from tensorflow.python import pywrap_tfe
File "C:\Users\leode\anaconda3\envs\Science Fair\lib\site-packages\tensorflow\python\pywrap_tfe.py", line 28, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\leode\anaconda3\envs\Science Fair\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 83, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\leode\anaconda3\envs\Science Fair\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 64, in <module>
from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed while importing _pywrap_tensorflow_internal: The specified module could not be found.
Failed to load the native TensorFlow runtime.
However when I import tensorboard_plugin_wit:
import tensorboard_plugin_wit
It works fine.
What went wrong? If any of you need any further clarification, please comment- I'm not much of an expert on handling computers so I will do my best to answer:)
I figured out what the problem was. Unlike many third-party modules in python, installing tensorflow requires more than simply pip install . The way I installed tensorflow was by creating and activating a conda environment. For more information on how to install tensorflow via Pycharm, here is a helpful Youtube video: https://www.youtube.com/watch?v=5Ym-dOS9ssA&t=327s

Failed to import tensorflow

File "C:\Users\deepz\anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 64, in <module>
from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed while importing _pywrap_tensorflow_internal: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\deepz\anaconda3\lib\site-packages\tensorflow\__init__.py", line 41, in <module>
from tensorflow.python.tools import module_util as _module_util
File "C:\Users\deepz\anaconda3\lib\site-packages\tensorflow\python\__init__.py", line 40, in <module>
from tensorflow.python.eager import context
File "C:\Users\deepz\anaconda3\lib\site-packages\tensorflow\python\eager\context.py", line 35, in <module>
from tensorflow.python import pywrap_tfe
File "C:\Users\deepz\anaconda3\lib\site-packages\tensorflow\python\pywrap_tfe.py", line 28, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\deepz\anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 83, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\deepz\anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 64, in <module>
from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed while importing _pywrap_tensorflow_internal: The specified module could not be found.
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/errors
on importing TensorFlow as tf
I am getting this error please can someone help me to solve this problem.
system HP 245 G5 and operating system windows 10 2004 version
If you have Anaconda installed I recommend you use Conda to install tensorflow into a new environment. Reason is Conda installs tensorflow and the required Cuda Toolkit and the proper version of cuDNN. Pip does not install these and you have to download them seperately, unzip and store them in directories. You also have to adjust you environment variable to point to these directories.

erreur when running instaloader with the module `ContextManager`

when i start instaloader with python 3.5 i get this error with ContextManager, i found nothing on the web that helped, the os is rasbian 9
traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/pi/.local/lib/python3.5/site-packages/instaloader/__init__.py", line 16, in <module>
from .instaloader import Instaloader
File "/home/pi/.local/lib/python3.5/site-packages/instaloader/instaloader.py", line 16, in <module>
from typing import Any, Callable, ContextManager, IO, Iterator, List, Optional, Set, Union, cast
ImportError: cannot import name 'ContextManager'
Fixed 2 days ago: https://github.com/instaloader/instaloader/pull/777
Use --pre to install the pre-release version

unable to Import package 'from chatbase import Messgae'?

hi there I'm currently facing this issue Unable to installed properly chatbase its give me module error
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/dellvostro/.local/lib/python3.6/site-packages/chatbase/__init__.py", line 18, in <module>
from chatbase.facebook_agent_message import * File "/home/dellvostro/.local/lib/python3.6/site-packages/chatbase/facebook_agent_message.py", line 19, in <module>
from base_message import Message ModuleNotFoundError: No module named 'base_message'
please help me,I m following this link click I was also used both pip and pip3 to installed the package chronological order.
thanks

Resources