I followed the install from this page :
https://alliseesolutions.wordpress.com/2016/09/08/install-gpu-tensorflow-from-sources-w-ubuntu-16-04-and-cuda-8-0-rc/
Had no issues for all the steps, installed CUDA 8.0 and Cudnn5.1 before hand. (Couldn't specify 5.1 during the configure of TensorFlow, so I said 5)
I am not using anaconda or a virtual environment.
Here is what I'm getting :
I pointed towards python3.5, so I launch python3 in command line, import tensorflow as tf, try to run the example from the webpage (or on the tensorflow website: https://www.tensorflow.org/versions/master/get_started/os_setup#test_the_tensorflow_installation), and I get errors such as :
AttributeError: module 'tensorflow' has no attribute 'InteractiveSession'
AttributeError: module 'tensorflow' has no attribute 'constant'
My guess is it can't find any of the submodules of tensorflow, and when I do dir(tf) I get :
['doc', 'loader', 'name', 'package', 'path', 'spec']
Which I'm guessing is way less than it should.
This is very similar to an issue on github of tensorflow : https://github.com/tensorflow/tensorflow/issues/3369
But it hasn't helped me.
I've removed the tensorflow folder and reinstalled couple times, I didn't try to re install CUDA cause I don't think the problem comes from there.
Any thoughts?
Between the initial tutorial, the Tensorflow Install page and this other tutorial : http://withr.me/install-tensorflow-ubuntu-16-04/ , I managed to install Tensorflow with Python 3.5.
Unfortunately I don't have a clear idea how I did it, I just took pieces from the three parts.
Related
On the PyTorch website it lists two blocks of commands for the ROCm version installation. The first one, that installs torch itself, goes well, but when I try to import it shows this message.
ImportError: libtinfo.so.5: cannot open shared object file: No such file or directory
Also, when trying to install the torchvision package with the second block of commands, it shows a similar error.
ModuleNotFoundError: No module named 'torch'
This only happens for with the ROCm compute platform. Installing with CUDA works just fine, but unfortunately I don't have a NVidia GPU.
I believe it was a bug that haven't been fixed. You can make a local symbolic link named libtinfo.6.so to /usr/lib/libtinfo5.so, in the same folder as libtaichi_core.so
This should solve it,
I have seen TensorFlow installation issues many times on this site. I have tried most of the fixes that I've come across, but none of them have quite worked.
Technical information:
Windows 10, 64 bit
Python version: Python 3.6
PyCharm
Current conda virtual environment: tensorflow_env, with interpreter as "Python 3.6 (tensorflow_env) (2) C:\Users\username\Anaconda3\envs\tensorflow_env\pythonw.exe"
Please let me know if I'm missing any important information, so I can add it.
Description of the issue:
In PyCharm, I have the code "import tensorflow" which results in the error mentioned in the title.
Now, when I start typing "import tens" it auto-completes to "import tensorflow" for me (see the figure below), which makes me think that it sees the module in some way, but it just can't import for some reason.
Additionally, my project interpreter has tensorflow as a listed package (see the figure below).
In order to install tensorflow, I have tried a number of methods. Here are some of them.
pip install tensorflow (resulted in "successful installation of . . .")
pip3 install tensorflow (resulted in "successful installation of . . .")
A number of ways of upgrading tensorflow (e.g. pip upgrade), most of which have resulted in success messages.
Through the interpreter itself, resulting in the following image (note the "Package 'tensorflow installed correctly" message at the bottom.
Now that all being said, I can technically import tensorflow using the command prompt and the following commands.
conda activate tensorflow_env
python
import tensorflow (does not result in error)
import keras (results in "Using TensorFlow backend.")
However, I would like to use this outside the command prompt.
I've tried a few Youtube tutorials (most notably tech with tim's video on the subject, as well as his troubleshooting video), the instructions on the tensorflow website, removing every version of python from my computer and trying again (twice), and the instructions I've seen on other posts on stackoverflow.
I'm certain I'm just missing something simple and obvious, but I need some help figuring out what that is.
I appreciate it. Thanks!
I keep getting this error while trying to import pytorch in jupyter notebook
import torch
AttributeError: function 'AddDllDirectory' not found
this error occur only when I try installing pytorch in anaconda (I used both command to install pytorch pip and conda, I also tried installing only the cpu version and nothing changed, i still get the same error while trying to import it)
I searched the internet and found nothing remotely close to my problem.
is there's a way I can fix this error?
thanks in advance
I fixed the issue by installing the file (KB2533623) from
Here (for windows 7 users). this file apparently contains the missing "AddDllDirectory" function.
Posting this answe in case someone ran into the same problem.
I'm new on python spacy package.
I wanted to download model 'en_core_web_sm' and I get AttributeError.
I searched since 2 days all over the web and I couldn't fix it.
Someone can help me please ?
The code :
import spacy
nlp=spacy.load('en_core_web_sm')
The error :
n = y.shape[0]
AttributeError: 'NoneType' object has no attribute 'ndarray'
I'm using Python 3.6 on conda environment (spyder)
This happened to me once during development and the reason was that for some reason, my code tricked spaCy into thinking I was on GPU. On GPU, spaCy uses cupy instead of numpy – and if cupy is not installed, it defaults to None. It's likely that the code should be calling numpy.ndarray, but it's calling cupy.ndarray, i.e. None.ndarray, which results in that error.
If you've intended to run spaCy on GPU, make sure it's available and you've installed the correct dependencies for your CUDA version. If you're running spaCy on CPU, here are some things to try:
Check what's installed in your environment and make sure you didn't accidentally end up with a half-broken install of cupy or something like that. Also make sure numpy is installed correctly.
Unsatisfying answer, but often helps: uninstall spaCy and its dependencies, and reinstall the latest version, ideally in a clean virtual environment.
I know this question has been asked before but I have not been able to fix the issue with the responses, hence posting this one.
I get this error :
ModuleNotFoundError: No module named 'keras'
when I import keras.
1) I created a new env ( python 3.5 ) and insatlled tensorflow,theano and keras.
2) I can see the package Keras when I list the packages in this env
3) I tried uninstalling and then install Keras back ( using pip3 as well , as suggested in another forum)
4) I can see keras folder under /site-packages
Not sure what I should be doing to get it to work. TIA.
I ran into this issue on a windows laptop. the other answer didn't help me... here's what I did to get it working:
first I had to stop using cygwin. the various commands are a bit wonky unless you are using cmd.exe.
second, I read this article and follow the instructions to essentially install Jupyter within the env I wanted it to play with.
https://www.quora.com/How-can-I-work-with-Keras-on-a-Jupyter-notebook-using-Tensorflow-as-backend
hopefully this will help someone!