I'm having serious problems with wandb on a nVidia pytorch image using arm64 architecture. No info online on how to solve this problem. Cannot even start a project with wandb.init()
[python error]: https://i.stack.imgur.com/pdgDT.png
AttributeError Traceback (most recent call last)
in
1 #!pip install wandb
2 import wandb
----> 3 wandb.init(project='gpt3')
AttributeError: module 'wandb' has no attribute 'init'
It seems wandb hasn't been installed correctly in your case.
Related
I have a laptop with Windows 10 Pro with Python 3.6.
This is my pip freeze on Windows:
numpy==1.19.5
absl-py==0.10.0
aiofiles==0.6.0
aiohttp==3.7.3
APScheduler==3.6.3
astor==0.8.1
async-generator==1.10
async-timeout==3.0.1
attrs==20.3.0
bidict==0.21.2
blis==0.7.4
boto3==1.16.50
botocore==1.19.50
bz2file==0.98
cached-property==1.5.2
cachetools==4.2.0
catalogue==1.0.0
certifi==2020.12.5
cffi==1.14.4
chardet==3.0.4
click==7.1.2
cloudpickle==1.6.0
colorama==0.4.4
colorclass==2.2.0
coloredlogs==10.0
colorhash==1.0.3
ConfigArgParse==1.2.3
contextvars==2.4
cryptography==3.3.1
cycler==0.10.0
cymem==2.0.5
dataclasses==0.8
decorator==4.4.2
dill==0.3.3
dnspython==1.16.0
docopt==0.6.2
dopamine-rl==3.0.1
fbmessenger==6.0.0
Flask==1.1.2
future==0.18.2
gast==0.2.2
gevent==1.5.0
gin-config==0.4.0
google-api-core==1.24.1
google-api-python-client==1.12.8
google-auth==1.24.0
google-auth-httplib2==0.0.4
google-pasta==0.2.0
googleapis-common-protos==1.52.0
greenlet==0.4.17
grpcio==1.34.0
gunicorn==20.0.4
gym==0.18.0
h11==0.8.1
h2==3.2.0
h5py==3.1.0
hpack==3.0.0
hstspreload==2020.12.22
httpcore==0.3.0
httplib2==0.18.1
httptools==0.1.1
httpx==0.9.3
humanfriendly==9.1
hyperframe==5.2.0
idna==2.10
idna-ssl==1.1.0
immutables==0.14
importlib-metadata==3.3.0
importlib-resources==4.1.1
itsdangerous==1.1.0
Jinja2==2.11.2
jmespath==0.10.0
jsonpickle==1.4.2
jsonschema==3.2.0
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.2
kfac==0.2.0
kiwisolver==1.3.1
Markdown==3.3.3
MarkupSafe==1.1.1
matplotlib==3.3.3
mattermostwrapper==2.2
mesh-tensorflow==0.1.18
mpmath==1.1.0
multidict==4.6.1
murmurhash==1.0.5
networkx==2.3
oauth2client==4.1.3
opencv-python==4.5.1.48
opt-einsum==3.3.0
packaging==19.2
pika==1.0.1
Pillow==7.2.0
plac==1.1.3
preshed==3.0.5
promise==2.3
prompt-toolkit==3.0.9
protobuf==3.14.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycparser==2.20
pydot==1.4.1
pyglet==1.5.0
PyJWT==1.7.1
pykwalify==1.7.0
pymongo==3.11.2
pyparsing==2.4.7
pypng==0.0.20
pyreadline==2.1
pyrsistent==0.17.3
python-crfsuite==0.9.7
python-dateutil==2.8.1
python-engineio==4.0.0
python-socketio==5.0.4
python-telegram-bot==11.1.0
pytz==2019.3
PyYAML==5.3.1
questionary==1.9.0
rasa==1.6.0
rasa-sdk==1.6.1
redis==3.3.11
requests==2.25.1
requests-async==0.5.0
requests-toolbelt==0.9.1
rfc3986==1.4.0
rocketchat-API==0.6.36
rsa==4.6
ruamel.yaml==0.15.100
s3transfer==0.3.3
sanic==19.9.0
Sanic-Cors==0.9.9.post1
sanic-jwt==1.5.0
Sanic-Plugins-Framework==0.9.4.post1
scikit-learn==0.20.4
scipy==1.5.4
six==1.15.0
sklearn-crfsuite==0.3.6
slackclient==1.3.2
sniffio==1.2.0
spacy==2.3.5
SQLAlchemy==1.3.22
srsly==1.0.5
sympy==1.7.1
tabulate==0.8.7
tensor2tensor==1.14.1
tensorboard==1.15.0
tensorflow==1.15.3
tensorflow-datasets==3.1.0
tensorflow-estimator==1.15.1
tensorflow-gan==2.0.0
tensorflow-hub==0.11.0
tensorflow-metadata==0.26.0
tensorflow-probability==0.7.0
termcolor==1.1.0
terminaltables==3.1.0
thinc==7.4.5
tqdm==4.55.1
twilio==6.50.1
typing-extensions==3.7.4.3
tzlocal==2.1
uritemplate==3.0.1
urllib3==1.26.2
wasabi==0.8.0
wcwidth==0.2.5
webexteamssdk==1.6
websocket-client==0.54.0
websockets==8.1
Werkzeug==1.0.1
wrapt==1.12.1
yarl==1.6.3
zipp==3.4.0
The project I'm working on uses Rasa 1.6.0 and with these requirements, everything runs as expected on Windows.
However, for a specific task, I need to be on Ubuntu and so I installed Ubuntu 18.04 on a VirtualBox 6.1 machine, installed python and pip and run pip install -r requirements.txt command to install the exact same requirements on that machine, inside a virtual environment.
After this, if I try to run rasa train on a shell or import tensorflow as tf on a python console, an error appears:
Illegal instruction (core dumped)
Any ideias on what the cause for this error could be ?
I saw some people saying it could be some incompatibility of tensorflow with the architecture of the processor being used, however in my case that should not be the problem since everything works on Windows (right ?).
I also tried to uninstall tensorflow and followed some online tutorials to Build from source but now, when I run rasa --version, tensorflow is no longer found:
$ rasa --version
Traceback (most recent call last):
File "/home/<USER>/Desktop/venv_rasa/bin/rasa", line 8, in <module>
sys.exit(main())
File "/home/<USER>/Desktop/venv_rasa/lib/python3.6/site-packages/rasa/__main__.py", line 69, in main
set_log_level(log_level)
File "/home/<USER>/Desktop/venv_rasa/lib/python3.6/site-packages/rasa/utils/common.py", line 68, in set_log_level
update_tensorflow_log_level()
File "/home/<USER>/Desktop/venv_rasa/lib/python3.6/site-packages/rasa/utils/common.py", line 108, in update_tensorflow_log_level
import tensorflow as tf
ModuleNotFoundError: No module named 'tensorflow'
But, inside a Python console, I can import tensorflow but if I try so access anything, other errors are shown:
>>> import tensorflow as tf
>>> tf.__version__
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'tensorflow' has no attribute '__version__'
>>>
>>> mnist = tf.keras.datasets.mnist
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'tensorflow' has no attribute 'keras'
Am I missing anything ?
Am I doing something wrong ?
Thanks in advance!
I saw some people saying it could be some incompatibility of tensorflow with the architecture of the processor being used, however in my case that should not be the problem since everything works on Windows (right ?).
I think this may in fact be your problem. When you're using VirtualBox, you're no longer in the same environment as on your windows machine, and you could be running into incompatibilities there that were not happening in your local windows environment.
The fact that the module you built from source is not found, is most likely because it isn't in your PYTHONPATH.
I would recommend using a virtual environment and following e.g. these instructions for installing tensorflow on Ubuntu, since that's what your VirtualBox is running: https://linuxize.com/post/how-to-install-tensorflow-on-ubuntu-18-04/
I am having a problem as i upload my model in drive and mount it in Colab module imports are working fine in previous cell as i gave the root path and sys.append() it , I am using (tf.compat.v1) you can see it in ouptut, but still getting this error also tried (tensorflow v2) and used tf.io.gfile but still same error. Kindly help me
<module 'tensorflow_core.compat.v1.version' from '/usr/local/lib/python3.6/dist-packages/tensorflow_core/_api/v2/compat/v1/version/__init__.py'>
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-7-e851eb463895> in <module>()
1 print(tf.version)
----> 2 category_index = label_map_util.create_category_index_from_labelmap(PATH_TO_LABELS, use_display_name=True)
2 frames
/content/drive/My Drive/models/research/object_detection/utils/label_map_util.py in load_labelmap(path)
136 a StringIntLabelMapProto
137 """
--> 138 with tf.gfile.GFile(path, 'r') as fid:
139 label_map_string = fid.read()
140 label_map = string_int_label_map_pb2.StringIntLabelMap()
AttributeError: module 'tensorflow' has no attribute 'gfile'
Try to downgrade TF 1.15 from TF 2.x, your issue will be resolved.
Please refer code as shown below
!pip uninstall tensorflow
!pip install tensorflow==1.15
import tensorflow as tf
If you are looking for simple solution for Colab, please use %tensorflow_version 1.x magic command, which does for you without un-installation.
%tensorflow_version 1.x
import tensorflow as tf
I used to use Anaconda 4.3.1 (64-bit) along with Python 3.6.0 and have written several codes and all of them worked fine. I also used Jupyter (Notebook Server 5.0.0) and Spyder too. They all work and my codes were able to run correctly. After recent updates on Anaconda, Spyder and Python all my recent Python codes (those worked before the updates) are not working.
Any Suggestions?
Could you please let me know how I can go back to Anaconda 4.3.1 with Python 3.6.0?
Thank you in advance for an early reply.
Best Regards
I uninstalled and did fresh installation of Anaconda a few times but no
changed with same errors.
Please see below for the error messages:
(TypeError Traceback (most recent call last)
D:\Software\AnacondaDistribution\Anaconda\lib\site-packages\matplotlib\colors.py in to_rgba(c, alpha)
131 try:
--> 132 rgba = _colors_full_map.cache[c, alpha]
133 except (KeyError, TypeError): # Not in cache, or unhashable.
TypeError: unhashable type: 'numpy.ndarray'
During handling of the above exception, another exception occurred:
ValueError Traceback (most recent call last)
D:\Software\AnacondaDistribution\Anaconda\lib\site-packages\matplotlib\axes_axes.py in scatter(self, x, y, s, c, marker, cmap, norm, vmin, vmax, alpha, linewidths, verts, edgecolors, **kwargs)
4049 # must be acceptable as PathCollection facecolors
-> 4050 colors = mcolors.to_rgba_array(c)
4051 except ValueError: )
matplotlib should plot the figure without any issues.
I installed pytorch using pip3 command for my windows pc without GPU support.
But when I tried to import torch it is giving an error.
At first, there was a different error saying numpy version not matching and I updated the numpy to the latest version.
import torch
RuntimeError Traceback (most recent call last)
<ipython-input-10-c031d3dd82fc> in <module>()
----> 1 import torch
C:\Users\iamuraptha\Anaconda3\lib\site-packages\torch\__init__.py in <module>()
82 pass
83
---> 84 from torch._C import *
85
86 __all__ += [name for name in dir(_C)
RuntimeError: generic_type: cannot initialize type "TensorProtoDataType": an object with that name is already defined
I reinstalled anaconda and then created a virtual environment for pytorch.Now everything works fine
If you are running this in colab, remember to restart your runtime after installing your modules with pip.
I am on windows using Anaconda with python 3.6, I have installed keras by:
conda install -c conda-forge keras
and whene i try this code
from keras.models import Graph
I get this error message:
ImportError Traceback (most recent call last)
<ipython-input-4-74d2d1fd7bad> in <module>()
----> 1 from keras.models import Graph
ImportError: cannot import name 'Graph'
This is not a Python issue. This is because the latest version of keras has removed Graph module from models. You can surely check the documentation.
If you check this Github issue (Why Keras remove graph model?), you can use the following line of code:
from .legacy.models import Graph
However, it is suggested to use functional API instead. Please check The Functional API