How to install TensorFlow packages without error by using pip - python

I am installing TensorFlow for the python3.8 version using pip. It is downloading most of the packages, but it is not able to install some packages and it is throwing an error like this :
Installing collected packages: tensorflow
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'C:\Users\vssnr\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\tensorflow\include\external\com_github_grpc_grpc\src\core\ext\filters\client_channel\lb_policy\grpclb\client_load_reporting_filter.h'
HINT: This error might have occurred since this system does not have Windows Long Path support enabled. You can find information on how to enable this at https://pip.pypa.io/warnings/enable-long-paths
Please inform me how to download the TensorFlow without any mistakes like this. Or how to resolve this issue?

Open your Windows PowerShell with Admin access and try inputting this :
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `
-Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
And after, try to run the pip command to install TensorFlow again and you are able to install it

Related

Getting error while installing the great exepectation tool in local

ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'C:\\Users\\dineshreddy.d\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\jedi\\third_party\\django-stubs\\django-stubs\\contrib\\contenttypes\\management\\commands\\remove_stale_contenttypes.pyi'
I am unable to install the great expecatation packages in the local . Getting the above error.
I tried with the pip install great_expectations --user command but i am getting the same error
It looks like you are running into an issue with a missing file when trying to install the greatexpectations package. The file that is missing is located in the
C:Usersdineshreddy.dAppDataLocalPackagesPythonSoftwareFoundation contains the file that is missing. The removeestale_contenttypes.pyi file can be found in the Python.3.10qbz5n2kfra8p0LocalCachelocal-packagesPython310site-packagesjedithirdpartydjango-stubsdjango-stubscontribcontenttypesmanagementcommands directory.
You can try reinstalling the jedi package with the pip install jedi command to resolve this issue. You can also try installing the great expectations package in a virtual environment to avoid conflicts with other packages.

Installing GeoPandas gives a WinError 126 (conda) /GDAL API (pip) error. How do I resolve it?

I want to install GeoPandas. When I use 'pip install geopandas' I get an error saying this:
A GDAL API version must be specified. Provide a path to gdal-config using a GDAL_CONFIG environment variable.
When I try using 'conda install geopandas' it throws an OSError 126.
I've tried downloading the geopandas.whl and try installing it that way, but this does not work either. I also tried downloading C++ which also did not help.
I have Python 3.7.4 and work on a Windows 10 system.
Edit: Full error using conda install

Issues with installing tweepy with Anaconda

I'm getting this error while trying to install Tweepy Package for python (i'm working with anconda prompt):
ERROR conda.core.link:_execute_actions(337): An error occurred while installing package 'conda-forge::pyjwt-1.5.3-py_0'.
CondaError: Cannot link a source that does not exist. C:\ProgramData\Anaconda2\Scripts\conda.exe
Running `conda clean --packages` may resolve your problem.
Attempting to roll back.
CondaError: Cannot link a source that does not exist. C:\ProgramData\Anaconda2\Scripts\conda.exe
Running `conda clean --packages` may resolve your problem.
I followed the suggestion and ran 'conda clean --packages' and then tried to install it again, using conda install -c conda-forge tweepy, suffice to say it didn't work and I'm getting the following error :
ERROR conda.core.link:_execute_actions(337): An error occurred while installing package 'conda-forge::pyjwt-1.5.3-py_0'.
CondaError: Cannot link a source that does not exist. C:\ProgramData\Anaconda2\Scripts\conda.exe
Running `conda clean --packages` may resolve your problem.
Attempting to roll back.
CondaError: Cannot link a source that does not exist. C:\ProgramData\Anaconda2\Scripts\conda.exe
Running `conda clean --packages` may resolve your problem.
Any help here? I'm using python 2.7, Anconda2-5.0.1 and Windows 10
I got the same exact error as yours. If you check tweepy's Github https://github.com/tweepy/tweepyyou you will read that the easiest way to install tweepy is by using pip, so you should follow that way instead.
So in case you haven't installed pip using conda, then type at the conda command prompt
conda install pip
Then again on the command prompt
pip install tweepy
It should work now

python - IO Error [Errno 2] No such file or directory when downloading package

I was trying to download a Python wrapper called rawpy on my Windows machine. I used the command "pip install rawpy". I have already looked at many other SO threads but could find no solution. The exact error is :
IO Error: [Errno 2] No such file or directory:
'external/LibRawcmake/CMakeLists.txt'
The only dependency for the wrapper is numpy, which I successfully installed. I would like to know how to fix this. Quite new to Python, so any information would help.
By separate communication the OP said that the installed pip version is 7.1.0 and Python 2.7. The solution was to update pip to a version >= 8. The underlying issue is related to SOABI tag handling in Python 2, particularly when creating the binary wheels with pip >= 8 and trying to load them in pip < 8. pip 7 didn't identify the available binary wheels as compatible and instead downloaded the source distribution which then failed to install spectacularly.
User letmaik was able to help me with this. It turned out that the error was caused by my version of pip being too old. The command "python -m pip install -U pip" did not work to upgrade pip; "easy_install -U pip" was required. This allowed rawpy to be installed successfully.

How to build pysparse on Ubuntu

When I try to install pysparse via pip install pysparse==1.3-dev, the build fails with the error:
pysparse/sparse/src/spmatrixmodule.c:4:22: fatal error: spmatrix.h: No such file or directory
These kinds of errors are usually the result of some missing system dev package, but googling doesn't show anything for "spmatrix". I tried installing the python-sparse package, which does provide this file, but I still get the same error.
How do I fix this?
In this dev-1.3 pakage there were no ".h" and ".c" files if you go through their source.
Use pip install pysparse==1.2-dev213 or lower versions or pip install csc-pysparse

Categories

Resources