I'm trying to install bamboolib on a virtual env (py 3.6.8) but when I try to import the library on Jupyter lab I get the following error: module 'bamboolib' has no attribute 'plugins'.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\f.surace\py36\lib\site-packages\bamboolib\__init__.py", line 85, in <module>
from bamboolib.wrangler import show
File "C:\Users\f.surace\py36\lib\site-packages\bamboolib\wrangler.py", line 81, in <module>
from bamboolib.views.suggest_string_manipulation import SuggestStringManipulation
File "C:\Users\f.surace\py36\lib\site-packages\bamboolib\views\suggest_string_manipulation.py", line 13, in <module>
from bamboolib.transformation_plugins.string_transformations import (
File "C:\Users\f.surace\py36\lib\site-packages\bamboolib\transformation_plugins\__init__.py", line 5, in <module>
from bamboolib.transformation_plugins.bulk_change_datatype import BulkChangeDatatype
File "C:\Users\f.surace\py36\lib\site-packages\bamboolib\transformation_plugins\bulk_change_datatype.py", line 9, in <module>
from bamboolib.plugins import TransformationPlugin, DF_OLD, DF_NEW, Singleselect, Text
File "C:\Users\f.surace\py36\lib\site-packages\bamboolib\plugins\__init__.py", line 6, in <module>
from bamboolib.plugins._utils import create_plugin_base_class
File "C:\Users\f.surace\py36\lib\site-packages\bamboolib\plugins\_utils.py", line 5, in <module>
import bamboolib.plugins._registry as PluginRegistry
AttributeError: module 'bamboolib' has no attribute 'plugins'
I met this problem when running program, this also happened when I tried pyttsx3 . Anyone know this problem. I was looking for some solution but none of it works.
Traceback (most recent call last):
File "/Users/macbookpro/Documents/python/generate_words.py", line 80, in <module>
main()
File "/Users/macbookpro/Documents/python/generate_words.py", line 16, in main
answer_part()
File "/Users/macbookpro/Documents/python/generate_words.py", line 51, in answer_part
translate(w)
File "/Users/macbookpro/Documents/python/generate_words.py", line 57, in translate
playsound.playsound('welcome.mp3')
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/playsound.py", line 55, in _playsoundOSX
from AppKit import NSSound
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 6, in <module>
from . import _objc
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/objc/_objc.cpython-310-darwin.so, 2): Symbol not found: _FSPathMakeRef
Referenced from: /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/objc/_objc.cpython-310-darwin.so
Expected in: flat namespace
in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/objc/_objc.cpython-310-darwin.so
I use python3.6.0 (googletrans3.0). I import googletrans3.0.
Traceback (most recent call last):
File "C:\Python\Python36-32\traduction essai.py", line 3, in <module>
import googletrans
File "C:\Python\Python36-32\lib\site-packages\googletrans\__init__.py", line 6, in <module>
from googletrans.client import Translator
File "C:\Python\Python36-32\lib\site-packages\googletrans\client.py", line 10, in <module>
import httpcore
File "C:\Python\Python36-32\lib\site-packages\httpcore\__init__.py", line 2, in <module>
from ._async.connection_pool import AsyncConnectionPool
File "C:\Python\Python36-32\lib\site-packages\httpcore\_async\connection_pool.py", line 4, in <module>
from .._backends.auto import AsyncLock, AsyncSemaphore, AutoBackend
File "C:\Python\Python36-32\lib\site-packages\httpcore\_backends\auto.py", line 4, in <module>
import sniffio
File "C:\Python\Python36-32\lib\site-packages\sniffio\__init__.py", line 10, in <module>
from ._impl import (
File "C:\Python\Python36-32\lib\site-packages\sniffio\_impl.py", line 1, in <module>
from contextvars import ContextVar
File "C:\Python\Python36-32\lib\site-packages\contextvars\__init__.py", line 4, in <module>
import immutables
File "C:\Python\Python36-32\lib\site-packages\immutables\__init__.py", line 18, in <module>
from ._protocols import MapKeys as MapKeys
File "C:\Python\Python36-32\lib\site-packages\immutables\_protocols.py", line 6, in <module>
from typing import NoReturn
ImportError: cannot import name 'NoReturn'
image
This is my code:
from example1 import db, Puppy
db.create_all()
sam = Puppy('Sammy', 3)
frank = Puppy ('Frankie',2)
print (sam.id)
print (frank.id)
db.session.add_all([sam,frank])
db.session.commit()
print(sam.id)
print(frank.id)
And this is my error:
& C:/Python/Python38/python.exe r:/dinabelajar/Flask-Bootcamp-master/05-Databases/coba/setdatabase.py
Traceback (most recent call last):
File "r:/dinabelajar/Flask-Bootcamp-master/05-Databases/coba/setdatabase.py", line 1, in <module>
from example1 import db, Puppy
File "r:\dinabelajar\Flask-Bootcamp-master\05-Databases\coba\example1.py", line 3, in <module>
from flask_sqlalchemy import SQLAlchemy
File "C:\Python\Python38\lib\site-packages\flask_sqlalchemy\__init__.py", line 22, in <module>
import sqlalchemy
File "C:\Python\Python38\lib\site-packages\sqlalchemy\__init__.py", line 9, in <module>
from .sql import (
File "C:\Python\Python38\lib\site-packages\sqlalchemy\sql\__init__.py", line 8, in <module>
from .expression import (
File "C:\Python\Python38\lib\site-packages\sqlalchemy\sql\expression.py", line 34, in <module>
from .visitors import Visitable
File "C:\Python\Python38\lib\site-packages\sqlalchemy\sql\visitors.py", line 28, in <module>
from .. import util
File "C:\Python\Python38\lib\site-packages\sqlalchemy\util\__init__.py", line 8, in <module>
from .compat import callable, cmp, reduce, \
File "C:\Python\Python38\lib\site-packages\sqlalchemy\util\compat.py", line 172, in <module>
time_func = time.clock
AttributeError: module 'time' has no attribute 'clock'
PS R:\dinabelajar\Flask-Bootcamp-master> & C:/Python/Python38/python.exe r:/dinabelajar/Flask-Bootcamp-master/05-Databases/coba/setdatabase.py
Traceback (most recent call last):
File "r:/dinabelajar/Flask-Bootcamp-master/05-Databases/coba/setdatabase.py", line 1, in <module>
from example1 import db, Puppy
File "r:\dinabelajar\Flask-Bootcamp-master\05-Databases\coba\example1.py", line 3, in <module>
from flask_sqlalchemy import SQLAlchemy
File "C:\Python\Python38\lib\site-packages\flask_sqlalchemy\__init__.py", line 22, in <module>
import sqlalchemy
File "C:\Python\Python38\lib\site-packages\sqlalchemy\__init__.py", line 9, in <module>
from .sql import (
File "C:\Python\Python38\lib\site-packages\sqlalchemy\sql\__init__.py", line 8, in <module>
from .expression import (
File "C:\Python\Python38\lib\site-packages\sqlalchemy\sql\expression.py", line 34, in <module>
from .visitors import Visitable
File "C:\Python\Python38\lib\site-packages\sqlalchemy\sql\visitors.py", line 28, in <module>
from .. import util
File "C:\Python\Python38\lib\site-packages\sqlalchemy\util\__init__.py", line 8, in <module>
from .compat import callable, cmp, reduce, \
File "C:\Python\Python38\lib\site-packages\sqlalchemy\util\compat.py", line 172, in <module>
time_func = time.clock
AttributeError: module 'time' has no attribute 'clock'
PS R:\dinabelajar\Flask-Bootcamp-master> & C:/Python/Python38/python.exe r:/dinabelajar/Flask-Bootcamp-master/05-Databases/coba/setdatabase.py
Traceback (most recent call last):
File "r:/dinabelajar/Flask-Bootcamp-master/05-Databases/coba/setdatabase.py", line 1, in <module>
from example1 import db, Puppy
File "r:\dinabelajar\Flask-Bootcamp-master\05-Databases\coba\example1.py", line 3, in <module>
from flask_sqlalchemy import SQLAlchemy
File "C:\Python\Python38\lib\site-packages\flask_sqlalchemy\__init__.py", line 22, in <module>
import sqlalchemy
File "C:\Python\Python38\lib\site-packages\sqlalchemy\__init__.py", line 9, in <module>
from .sql import (
File "C:\Python\Python38\lib\site-packages\sqlalchemy\sql\__init__.py", line 8, in <module>
from .expression import (
File "C:\Python\Python38\lib\site-packages\sqlalchemy\sql\expression.py", line 34, in <module>
from .visitors import Visitable
File "C:\Python\Python38\lib\site-packages\sqlalchemy\sql\visitors.py", line 28, in <module>
from .. import util
File "C:\Python\Python38\lib\site-packages\sqlalchemy\util\__init__.py", line 8, in <module>
from .compat import callable, cmp, reduce, \
File "C:\Python\Python38\lib\site-packages\sqlalchemy\util\compat.py", line 172, in <module>
time_func = time.clock
AttributeError: module 'time' has no attribute 'clock'
PS R:\dinabelajar\Flask-Bootcamp-master> & C:/Python/Python38/python.exe r:/dinabelajar/Flask-Bootcamp-master/05-Databases/coba/setdatabase.py
Traceback (most recent call last):
File "r:/dinabelajar/Flask-Bootcamp-master/05-Databases/coba/setdatabase.py", line 1, in <module>
from example1 import db, Puppy
File "r:\dinabelajar\Flask-Bootcamp-master\05-Databases\coba\example1.py", line 3, in <module>
from flask_sqlalchemy import SQLAlchemy
File "C:\Python\Python38\lib\site-packages\flask_sqlalchemy\__init__.py", line 22, in <module>
import sqlalchemy
File "C:\Python\Python38\lib\site-packages\sqlalchemy\__init__.py", line 9, in <module>
from .sql import (
File "C:\Python\Python38\lib\site-packages\sqlalchemy\sql\__init__.py", line 8, in <module>
from .expression import (
File "C:\Python\Python38\lib\site-packages\sqlalchemy\sql\expression.py", line 34, in <module>
from .visitors import Visitable
File "C:\Python\Python38\lib\site-packages\sqlalchemy\sql\visitors.py", line 28, in <module>
from .. import util
File "C:\Python\Python38\lib\site-packages\sqlalchemy\util\__init__.py", line 8, in <module>
from .compat import callable, cmp, reduce, \
File "C:\Python\Python38\lib\site-packages\sqlalchemy\util\compat.py", line 172, in <module>
time_func = time.clock
AttributeError: module 'time' has no attribute 'clock'
How can i fix this?
you must update SQLAlchemy
pip uninstall SQLAlchemy
pip install SQLAlchemy==1.3.6
change time.clock() to time.perf_counter() in python 3.8
I am trying to run this simple code
import numpy as np
bmi = np.array([12,123,34])
print bmi
When I execute it however I get the following error:
Traceback (most recent call last):
File "sample10.py", line 1, in <module>
import numpy as np
File "C:\Users\Marc\AppData\Local\Enthought\Canopy\User\lib\site-packages\numpy\__init__.py", line 142, in <module>
from . import add_newdocs
File "C:\Users\Marc\AppData\Local\Enthought\Canopy\User\lib\site-packages\numpy\add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "C:\Users\Marc\AppData\Local\Enthought\Canopy\User\lib\site-packages\numpy\lib\__init__.py", line 8, in <module>
from .type_check import *
File "C:\Users\Marc\AppData\Local\Enthought\Canopy\User\lib\site-packages\numpy\lib\type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "C:\Users\Marc\AppData\Local\Enthought\Canopy\User\lib\site-packages\numpy\core\__init__.py", line 21, in <module>
from . import function_base
File "C:\Users\Marc\AppData\Local\Enthought\Canopy\User\lib\site-packages\numpy\core\function_base.py", line 6, in <module>
from .numeric import result_type, NaN, shares_memory, MAY_SHARE_BOUNDS, TooHardError
ImportError: cannot import name shares_memory
Any thoughts what might be causing this? When Im running
python --version
I get 2.7.11