I've try compile python3.6 with:
emc#belvedere:~/py36/Python-3.6.0rc1> ./configure --prefix=/home/emc/py36 --with-system-expat --with-system-expat --with-system-ffi --disable-ipv6 && make && make install
Compilation is success I can start interpreter:
emc#belvedere:~/py36/bin> ./python3.6
Python 3.6.0rc1 (default, Dec 14 2016, 13:08:45)
[GCC 4.8.1 20130909 [gcc-4_8-branch revision 202388]] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
but:
emc#belvedere:~/py36/bin> pip3.6
Traceback (most recent call last):
File "/home/emc/py36/lib/python3.6/site-packages/pip/_vendor/requests/packages/__init__.py", line 27, in <module>
from . import urllib3
File "/home/emc/py36/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/__init__.py", line 8, in <module>
from .connectionpool import (
File "/home/emc/py36/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 7, in <module>
from socket import error as SocketError, timeout as SocketTimeout
File "/home/emc/py36/lib/python3.6/socket.py", line 49, in <module>
import _socket
ModuleNotFoundError: No module named '_socket'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/emc/py36/bin/pip3.6", line 7, in <module>
from pip import main
File "/home/emc/py36/lib/python3.6/site-packages/pip/__init__.py", line 21, in <module>
from pip._vendor.requests.packages.urllib3.exceptions import DependencyWarning
File "/home/emc/py36/lib/python3.6/site-packages/pip/_vendor/requests/__init__.py", line 62, in <module>
from .packages.urllib3.exceptions import DependencyWarning
File "/home/emc/py36/lib/python3.6/site-packages/pip/_vendor/requests/packages/__init__.py", line 29, in <module>
import urllib3
ModuleNotFoundError: No module named 'urllib3'
During configuration I didn't get any problems:
http://pastebin.com/ePQ1awas
In fact I can see some socket lib in:
/home/emc/py36/lib64/python3.6/lib-dynload/_socket.cpython-36m-x86_64-linux-gnu.so
EDIT:
Can't import socket (same for thread)
>>> import _socket
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named '_socket'
>>>
>>>
>>> import socket
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/emc/py36/lib/python3.6/socket.py", line 49, in <module>
import _socket
ModuleNotFoundError: No module named '_socket'
Adding /home/emc/py36/lib/python3.6/site-packages to PYTHONPATH solved problem.
I had a similar problem after building 3.7.4 with prefix=/usr/local
Fix was to add to .bashrc the two lines:
export PYTHONHOME=/usr/local
export PYTHONPATH=/usr/local/lib64/python3.7/lib-dynload
Related
Traceback (most recent call last):
File "C:\Users\emwod\AppData\Local\Programs\Python\Python310\lib\site-packages\bs4\dammit.py", line 28, in <module>
import cchardet as chardet_module
ModuleNotFoundError: No module named 'cchardet'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\emwod\AppData\Local\Programs\Python\Python310\lib\site-packages\bs4\dammit.py", line 33, in <module>
import chardet as chardet_module
ModuleNotFoundError: No module named 'chardet'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/emwod/AppData/Local/Programs/Python/Python310/scrape.py", line 1, in <module>
import bs4 as bs
File "C:\Users\emwod\AppData\Local\Programs\Python\Python310\lib\site-packages\bs4\__init__.py", line 37, in <module>
from .builder import (
File "C:\Users\emwod\AppData\Local\Programs\Python\Python310\lib\site-packages\bs4\builder\__init__.py", line 9, in <module>
from bs4.element import (
File "C:\Users\emwod\AppData\Local\Programs\Python\Python310\lib\site-packages\bs4\element.py", line 19, in <module>
from bs4.formatter import (
File "C:\Users\emwod\AppData\Local\Programs\Python\Python310\lib\site-packages\bs4\formatter.py", line 1, in <module>
from bs4.dammit import EntitySubstitution
File "C:\Users\emwod\AppData\Local\Programs\Python\Python310\lib\site-packages\bs4\dammit.py", line 37, in <module>
import charset_normalizer as chardet_module
ValueError: source code string cannot contain null bytes
=== RESTART: C:/Users/emwod/AppData/Local/Programs/Python/Python310/scrape.py ==
Traceback (most recent call last):
File "C:\Users\emwod\AppData\Local\Programs\Python\Python310\lib\site-packages\bs4\dammit.py", line 28, in <module>
import cchardet as chardet_module
ModuleNotFoundError: No module named 'cchardet'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\emwod\AppData\Local\Programs\Python\Python310\lib\site-packages\bs4\dammit.py", line 33, in <module>
import chardet as chardet_module
ModuleNotFoundError: No module named 'chardet'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/emwod/AppData/Local/Programs/Python/Python310/scrape.py", line 1, in <module>
from bs4 import BeautifulSoup as bs
File "C:\Users\emwod\AppData\Local\Programs\Python\Python310\lib\site-packages\bs4\__init__.py", line 37, in <module>
from .builder import (
File "C:\Users\emwod\AppData\Local\Programs\Python\Python310\lib\site-packages\bs4\builder\__init__.py", line 9, in <module>
from bs4.element import (
File "C:\Users\emwod\AppData\Local\Programs\Python\Python310\lib\site-packages\bs4\element.py", line 19, in <module>
from bs4.formatter import (
File "C:\Users\emwod\AppData\Local\Programs\Python\Python310\lib\site-packages\bs4\formatter.py", line 1, in <module>
from bs4.dammit import EntitySubstitution
File "C:\Users\emwod\AppData\Local\Programs\Python\Python310\lib\site-packages\bs4\dammit.py", line 37, in <module>
import charset_normalizer as chardet_module
ValueError: source code string cannot contain null bytes
I was trying to start bs4 but this happend
ModuleNotFoundError: No module named 'cchardet'
Seems not to be a strict BeautifulSoup topic - A module is missing, so you should install it or put it in path if you like to use it:
pip install cchardet
*Not sure if you need cchardet for your task, so some improvment of question would be great. Take a read: How to create mcve.
I tried to import pyautogui on python 3.9.6 and I got these error messages. I tried installing pyobjc and more but its still not working. Any ways to fix this? Also this is my error message:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyautogui/_pyautogui_osx.py", line 5, in <module>
import Quartz
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/Quartz/__init__.py", line 6, in <module>
import AppKit
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/AppKit/__init__.py", line 10, in <module>
import Foundation
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/Foundation/__init__.py", line 9, in <module>
import CoreFoundation
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/CoreFoundation/__init__.py", line 9, in <module>
import objc
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/objc/__init__.py", line 37, in <module>
from ._context import * # noqa: F401, F403, E402
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/objc/_context.py", line 29, in <module>
from typing import Any
File "/Users/ognen/Desktop/Programs/typing.py", line 8, in <module>
pyautogui.write(x, interval = 0.01)
AttributeError: partially initialized module 'pyautogui' has no attribute 'write' (most likely due to a circular import)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/ognen/Desktop/Programs/BestPhone.py", line 19, in <module>
import pyautogui
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyautogui/__init__.py", line 146, in <module>
from . import _pyautogui_osx as platformModule
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyautogui/_pyautogui_osx.py", line 7, in <module>
assert False, "You must first install pyobjc-core and pyobjc: https://pyautogui.readthedocs.io/en/latest/install.html"
AssertionError: You must first install pyobjc-core and pyobjc: https://pyautogui.readthedocs.io/en/latest/install.html
Skynet-prototype-256:Programs ognen$ python3 BestPhone.py
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyautogui/_pyautogui_osx.py", line 5, in <module>
import Quartz
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/Quartz/__init__.py", line 6, in <module>
import AppKit
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/AppKit/__init__.py", line 10, in <module>
import Foundation
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/Foundation/__init__.py", line 9, in <module>
import CoreFoundation
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/CoreFoundation/__init__.py", line 9, in <module>
import objc
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/objc/__init__.py", line 37, in <module>
from ._context import * # noqa: F401, F403, E402
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/objc/_context.py", line 29, in <module>
from typing import Any
File "/Users/ognen/Desktop/Programs/typing.py", line 8, in <module>
pyautogui.write(x, interval = 0.01)
AttributeError: partially initialized module 'pyautogui' has no attribute 'write' (most likely due to a circular import)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/ognen/Desktop/Programs/BestPhone.py", line 19, in <module>
import pyautogui
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyautogui/__init__.py", line 146, in <module>
from . import _pyautogui_osx as platformModule
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyautogui/_pyautogui_osx.py", line 7, in <module>
assert False, "You must first install pyobjc-core and pyobjc: https://pyautogui.readthedocs.io/en/latest/install.html"
AssertionError: You must first install pyobjc-core and pyobjc: https://pyautogui.readthedocs.io/en/latest/install.html
I want to install flask_dance using pip3 but everytime i am getting this error:
ImportError: cannot import name 'dist'
my traceback looks something like this:
Traceback (most recent call last):
File "/home/kishori/bookverm/alpha/bin/pip3", line 7, in <module>
from pip import main
File "/home/kishori/bookverm/alpha/lib/python3.6/site-packages/pip/__init__.py", line 29, in <module>
from pip.utils import get_installed_distributions, get_prog
File "/home/kishori/bookverm/alpha/lib/python3.6/site-packages/pip/utils/__init__.py", line 23, in <module>
from pip.locations import (
File "/home/kishori/bookverm/alpha/lib/python3.6/site-packages/pip/locations.py", line 9, in <module>
from distutils import sysconfig
File "/home/kishori/bookverm/alpha/lib/python3.6/distutils/__init__.py", line 25, in <module>
from distutils import dist, sysconfig
ImportError: cannot import name 'dist'
I am trying to convert a savedModel into TensorFlow.js web format.
I installed tensorflowjs via sudo pip3 install tensorflowjs
When running tensorflowjs_converter--input_path=full_path_to/saved_model/saved_model.pb --outputpath=full_path_to/js
I get an error saying ImportError: cannot import name 'add_to_collection'
Even if I run tensorflowjs_converter --help, I get the exact same error.
Here is the full error:
Traceback (most recent call last):
File "/home/ubuntu/.local/lib/python3.6/site-packages/tensorflow_hub/tf_v1.py", line 29, in <module>
from tensorflow.compat.v1 import * # pylint: disable=wildcard-import
ModuleNotFoundError: No module named 'tensorflow.compat.v1'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ubuntu/.local/bin/tensorflowjs_converter", line 7, in <module>
from tensorflowjs.converters.converter import main
File "/home/ubuntu/.local/lib/python3.6/site-packages/tensorflowjs/__init__.py", line 21, in <module>
from tensorflowjs import converters
File "/home/ubuntu/.local/lib/python3.6/site-packages/tensorflowjs/converters/__init__.py", line 24, in <module>
from tensorflowjs.converters.tf_saved_model_conversion_v2 import convert_tf_saved_model
File "/home/ubuntu/.local/lib/python3.6/site-packages/tensorflowjs/converters/tf_saved_model_conversion_v2.py", line 37, in <module>
import tensorflow_hub as hub
File "/home/ubuntu/.local/lib/python3.6/site-packages/tensorflow_hub/__init__.py", line 30, in <module>
from tensorflow_hub.estimator import LatestModuleExporter
File "/home/ubuntu/.local/lib/python3.6/site-packages/tensorflow_hub/estimator.py", line 25, in <module>
from tensorflow_hub import tf_utils
File "/home/ubuntu/.local/lib/python3.6/site-packages/tensorflow_hub/tf_utils.py", line 28, in <module>
from tensorflow_hub import tf_v1
File "/home/ubuntu/.local/lib/python3.6/site-packages/tensorflow_hub/tf_v1.py", line 32, in <module>
from tensorflow import add_to_collection
ImportError: cannot import name 'add_to_collection'
Problem solved by downgrading tensorflowjs 1.0.1 to 0.6.4
I'm trying to clone and make this project to use in Vivado:
https://github.com/olajep/parallella-fpga/tree/2016.11
after I've cloned it then I use git submodule init and the gir submodule update command.
after that I used make command and I get this message:
Traceback (most recent call last):
File "/usr/lib/command-not-found", line 28, in <module>
from CommandNotFound import CommandNotFound
File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 19, in <module>
from CommandNotFound.db.db import SqliteDatabase
File "/usr/lib/python3/dist-packages/CommandNotFound/db/db.py", line 5, in <module>
import apt_pkg
ImportError: /opt/Xilinx/Vivado/2015.2/lib/lnx64.o/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /usr/lib/python3/dist-packages/apt_pkg.cpython-36m-x86_64-linux-gnu.so)
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in <module>
import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
import apt_pkg
ImportError: /opt/Xilinx/Vivado/2015.2/lib/lnx64.o/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /usr/lib/python3/dist-packages/apt_pkg.cpython-36m-x86_64-linux-gnu.so)
Original exception was:
Traceback (most recent call last):
File "/usr/lib/command-not-found", line 28, in <module>
from CommandNotFound import CommandNotFound
File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 19, in <module>
from CommandNotFound.db.db import SqliteDatabase
File "/usr/lib/python3/dist-packages/CommandNotFound/db/db.py", line 5, in <module>
import apt_pkg
ImportError: /opt/Xilinx/Vivado/2015.2/lib/lnx64.o/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /usr/lib/python3/dist-packages/apt_pkg.cpython-36m-x86_64-linux-gnu.so)
I'm using ubuntu 18.04 , Vivado 2015.2 and gcc 7.3.0
what should I do?
thanks
This line is your problem:
ImportError: /opt/Xilinx/Vivado/2015.2/lib/lnx64.o/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /usr/lib/python3/dist-packages/apt_pkg.cpython-36m-x86_64-linux-gnu.so)
You need to download and install the missing dependencies in order for your make command to work.