I have python 3.7 installed on a Windows 10 machine, no custom stuff at all, to install tensorflow I used:
pip3 install --user --upgrade tensorflow
but when I try importing it using:
import tensorflow
in a python script or shell it gives me the following error:
ImportError: DLL load failed: The specified module could not be found.
Am I doing something wrong?
edit: By the way pip version is 20.0.2, I precedently tried with pip 10.x and got the same result.
Regarding https://github.com/tensorflow/tensorflow/issues/35749 or https://github.com/tensorflow/tensorflow/issues/36859 (and the amount of same duplicate issues) there are some recents problems with tensorflow 2.1 for some windows computers.
A fix so far, is to use tensorflow 2.0 on windows :
pip install tensorflow==2.0
For more details, this is quite detailed : https://github.com/tensorflow/tensorflow/issues/36167#issuecomment-577886156
Related
I'm trying to use Azure Databricks to launch Python script that imports the library: "simple_salesforce"
I have installed the library as shown on the picture bellow, please note that while installing the library the name should be "simple-salesforce" and while importing it "simple_salesforce" (just to mention that I didn't mistaken the name):
Installation of the library
As shown on the picture bellow, the library was installed successfully:
simple-salesforce installed
When try to import it in my workspace, using:
import simple_salesforce
I get the following error (see the error picture bellow):
ImportError: No module named 'cryptography.hazmat.primitives.asymmetric.ed25519'
Error
I've tried to install the "cryptography" library with the same method I used to install the other libraries (see the picture bellow), but I still get the same error:
cryptography
Is there any step that I missed ?
Best regards,
You don't have the library "cryptography" installed. It is very likely that you are using a Databricks runtime version of 5.5 LTS or less, with one worker.
The problem is that you have a Databricks cluster with Python3 and the notebook is running on a Python2 kernel.
Method 1
Check if you have python 3:
%sh
python3 --version
Then install pip3:
%sh
sudo apt install python3-pip
After that you can install "cryptography"
Method 2
I highly recommand this method, which consists of using 7.4 Databricks Runtime version with a minimum of 2 workers, then you will have python3 and the library "cryptography" installed by default.
You will just need to install simple-salesforce manually from the libraries part, and:
import simple_salesforce
Issue in importing TENSORFLOW(error code-1073741795 in jupyter notebook, Pycharm, Anaconda command line and in spyder. Howevery I am able to install successfully. But when I'm trying import then I am getting this error
"ImportError: DLL load failed with error code-1073741795".
I have install all the versions of VS redistributable.
I am using win 7 with 64 bit os. I tried to install on tensorflow on all the versions of python 3.6, 3.7
& 3.8. with different versions of tensorflow. Did anyone encountered with error code-1073741795???
ImportError: DLL load failed with error code-1073741795
Failed to load the native tensorflow runtime.
See https://www.tensorflow.org/install/errors
what does error code-1073741795 means?
How do we fix it.
I got an error like this when installing tensorflow. It was because tensorflow was not installed properly.
First, delete your current installed tensorflow completely.
Install Anaconda.
Make a new conda environment (this will help).
After creating a conda environment, activate it.
After activating, write: 'conda install tensorflow==1.15.0'
I am suggesting tensorflow 1.15.0 because I have found it more stable and better than any other version.
To test it is working properly, write:
python
This will activate python, then write:
import tensorflow as tf
print(tf.__version__)
You may get some warnings when importing tensorflow, but ignore the warnings, you will not get any errors. (if you get any error, comment)
I'm trying to use tensorflow-gpu. Using Anaconda, I installed the libraries and active both (tensorflow and tensorflow-gpu) I have also installed Keras in this anaconda environment as well
Next I launch Spider IDE within my Anaconda environment and run my py script, that is when I get the following error:
cannot import tensorflow - Import Error: cannot import name 'self_check'
I'm totally lost. Any recommendations?
Using Python 3.5
Thanks
pip install --upgrade tensorflow
or
you can uninstall the tensorflow and re-install it.
I am installing Tensor Flow 0.11 in a virtual environment. After installing using this command
pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0-cp27-none-linux_x86_64.whl
I get error on importing the library:
import tensorflow
ImportError: /lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so: undefined symbol: PyUnicodeUCS4_AsUTF8String
Please tell how to resolve this. I have searched on the web and I got results relating to python using USC2 instead of USC4, but I could not resolve it.
Update: I installed miniconda and activated the conda enviroment. Then I carried on the installation of TensorFlow 0.11 in the conda environment and it successfully installed and gave no error on import tensorflow.
I installed tensorflow CPU version in windows as mentined on their official page.
It got installed successfully but giving error while I import the library.
Output for pip freeze also shows it's present:
spyder==3.1.2
SQLAlchemy==1.1.5
statsmodels==0.6.1
sympy==1.0
tables==3.2.2
tensorflow==1.0.1
toolz==0.8.2
tornado==4.4.2
traitlets==4.3.1
Using anaconda.
If you have python 2.X installed along with a Python 3.X do pip(version) example; pip3 instead of pip. I had a similar problem so i had a look around and someone said do pip3.6.1 but it spewed out an error so a few trys later pip3 worked. If not idk whats happening