can't install tensorflow library - windows

I am trying to install TensorFlow in windows.
Using pip command:
pip install tensorflow
But I'm getting this error message:
Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'C:\\Users\\naray\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python38\\site-packages\\tensorflow_estimator\\python\\estimator\\canned\\linear_optimizer\\python\\utils\\__pycache__\\sharded_mutable_dense_hashtable.cpython-38.pyc'
Can someone help me solve this error?

Related

Could not isntall packages due to an EnvironmentError [Errno 2]

I get the following error when trying to install packages using pip:
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'C:\\SnapVolumesTemp\\MountPoints\\{45c63495-0000-0000-0000-100000000000}\\{E8720320-8733-4E3E-B117-53FE443000AC}\\SVROOT\\Users\\heijd_de\\AppData\\Local\\Temp\\pip-install-hwdp4ddr\\imbalanced-learn\\imblearn/under_sampling/_prototype_generation/tests/test_cluster_centroids.py'
I am not really sure what this directory is. Someone knows how to solve this? I get this error for installing imblearn and plotly for example. When trying to upgrade pip I get this error:
ERROR: Could not install packages due to an EnvironmentError: [WinError 145] The directory is not empty: 'C:\\SnapVolumesTemp\\MountPoints\\{45c63495-0000-0000-0000-100000000000}\\{E8720320-8733-4E3E-B117-53FE443000AC}\\SVROOT\\Users\\heijd_de\\Anaconda3\\envs\\gdal_env\\Lib\\site-packages\\~ip\\_vendor\\urllib3\\packages\\ssl_match_hostname\\__pycache__'
Regards,
Dante

pip install IBM_DB does not work on Ubuntu 22.04 python 3.8

I am trying to install ibm_db v3.1.2 on python 3.8.13 Ubuntu 22.04 (5.15.0-40-generic)
pip install ibm_db
Collecting ibm_db
Downloading ibm_db-3.1.2.tar.gz (1.1 MB)
|████████████████████████████████| 1.1 MB 5.5 MB/s
Installing build dependencies ... done
Getting requirements to build wheel ... done
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: '/tmp/tmpfv417hua/output.json'
Other commands, such as pip install numpy work as expected
Any help would be appreciated.
Edit: I was able to work around the problem using Anaconda.
conda install -c conda-forge ibm_db. Now the basic use of ibm_db
ibm_db.pconnect(connection_string, "", "")
throws the error
[IBM][CLI Driver] SQL10013N The specified library "GSKit Error: 207" could not be loaded. SQLSTATE=42724 SQLCODE=-10013
which also seems to be known, but the suggested solution does not work.
Edit 2: pip3 install 'ibm_db==3.1.1' worked, so the problem may be with 3.1.2

I am in trouble while installing psycophy

I am installing psychopy package using pip install and I am facing the following error:
ImportError: No module named 'preferences'
Command "python setup.py egg_info" failed with error code 1
I've already installed preferences package and this error keep on showing up.
I stumbled upon the same problem, and it seems like installing 'django-preferences' helped me
sudo pip install django-preferences
Hope this helps.

Installing Tensorflow with Python 3.5 and Anaconda

I have Anaconda 3.19.3 with Python 3.5 on a Mac. Now, I would like to install TensorFlow via pip. The installation instructions here also include setup instructions for installing TensorFlow under Python 3.3+.
So, I have executed sudo easy_install --upgrade six, no problem. When I execute sudo pip3 install --upgrade https://storage.googleapis.com/tensorflow/mac/tensorflow-0.7.0-py3-none-any.whl, after downloading the necessary packages, I get the following:
Installing collected packages: setuptools, protobuf, tensorflow
Found existing installation: setuptools 19.6.2
Uninstalling setuptools-19.6.2:
Successfully uninstalled setuptools-19.6.2
Rolling back uninstall of setuptools
Exception:
...
AttributeError: _ep_map
During handling of the above exception, another exception occurred:
...
FileNotFoundError: [Errno 2] No such file or directory: '/Users/me/anaconda/lib/python3.5/site-packages/setuptools-19.6.2-py3.5.egg'
I have left out some of the error message to save space.
What is this and, more importantly, what can I do about it?
See the answer here:
Error setuptools when installing tensorflow
In particular, you could try adding the --ignore-installed tag to the end of your pip command.

Missing header tiffio.h installing Pillow on Mac OS X

When trying to install Pillow using PIP, I get this include error:
μ ~: pip install pillow
...
libImaging/TiffDecode.h:10:10: fatal error: 'tiffio.h' file not found
#include <tiffio.h>
^
1 error generated.
error: command 'cc' failed with exit status 1
Does anyone know how to resolve this? I'm on OS X 10.9 and have previously been able to build Pillow on this computer.
Update: Note that I have tiffio.h on my machine at /usr/local/include/tiffio.h. After setting that directory to the C include path, I am able to successfully compile Pillow.
μ ~: C_INCLUDE_PATH=/usr/local/include
μ ~: pip install pillow
Downloading/unpacking pillow
...
Successfully installed pillow
Cleaning up...
Is this how it's supposed to be done, or is there something wrong with my machine or the installation package?
I faced the same issue and got it solved by installing libtiff using homebrew:
brew install libtiff

Resources