Tensorflow-Text in Miniconda - tensorflow

I am trying to install tensorflow-text through miniconda in Spyder. I have managed to install other modules in Spyder such as tensorflow itself, pandas, scikit-learn, etc. However, using the same command as all the other installations (with the specific package name replaced by tensorflow-text)
conda install spyder-kernels tensorflow-text -y
I continue to get the same error whenever I try to install tensorflow-text:
PackagesNotFoundError: The following packages are not available from current channels:
- tensorflow-text
followed by a suggestion to search for the package on anaconda.org. As such, I searched for the tensorflow-text package on the anaconda site and found one, albeit for linux, by rocketce. Attempting to run the commands listed under the tensorflow-text installation instructions on that webpage also yielded the same error.
At first, I tried to install tensorflow-text through pip and was able to successfully run the command
pip install -U tensorflow-text==2.10.0
which seemed to install tensorflow-text. But I could not figure out how to access it or if it was correctly installed. Specifically, I am looking to use tensorflow-text in the Spyder IDE. I was able to get tensorflow working in the IDE, but not the specific tensorflow-text.
I am using a Windows 10 system; I could not find anything on the anaconda site for Windows 10. I am rather inexperienced (if you could not already tell from the nature and description of the problem), so patience and clear explanations are appreciated. Thanks in advance!

Related

Upgrade pip install on Win10 box

I'm trying to upgrade pip install to 22.3. I keep getting this error, "default to user install because normal sit-packages is not writeable."
I'm at the cmd prompt in win10 trying to install.
This came about because I'm trying to install pypdf2 and this won't install to python that's in my environment path. So I'm stumped.
Thanks for any help.
Unfortunately, I just uninstalled conda & the vanilla python. I reinstalled just plain python for now.
I think originally I did not use venv properly and maybe my conda & vanilla pythons could have been mixed? Not sure. But my vanilla 3.11 is working now and I do some more work.
Thanks for the help.
You can try to install it with the --user flag, which will install it to your user directory instead of the system directory. This is not recommended, but it will work.
pip install --user pypdf2

Unable to install XGBOOST on MAC using Anaconda

I am using the Graphical Interface of Anaconda. I tried to install py-xgboost but it gave me the following error-
*UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
py-xgboost -> python[version='>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.5,<3.6.0a0']
Your python: python=3.8
If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.*
It says I have python 3.8 installed in my system but when I checked the python version on my system using the command python2 --version & python3 --version it says I have python 2.7.16 & python 3.7.3
I dont have python 3.8
What shall I do now? The above python version were there already. I never installed and someone told me not to remove those versions as some of the MAC applications are dependent on them. Its a MAC BOOK PRO 15 ( 2019 )
After some research I found a solution. I had to downgrade my python version.
But as explained above when I tried to check the version of python I am using I was getting 2.7 & 3.7.3 but my ANACONDA gives an error that I have version 3.8
That was because Anaconda uses the python which is installed in a separate directory, it was not using the python installed at the PATH directory. So I had to downgrade python which the ANACONDA was using by using the command -
conda search python
BTW if your terminal says conda command not found, then you need to edit your PATH first.
Then it gives a list of python version, you can then see which version is right for your XGboost version and then use the command-
conda install python=3.7.7
or whatever version you wanted to use.
After the downgrade of python, anaconda will ask you to downgrade other libraries as well, so go ahead and do that too unless you are using some command which was not there in the older version.
Now install py-xgboost from ANACONDA Graphical interface or by using conda method
conda install -c anaconda py-xgboost

Installing pandas without pip

Is it possible to install pandas without installing pip or Is there any other way to use pandas without installing pip.
Thanks in advance.
pip is a package management system used to install and manage software packages written in Python. Many packages can be found in the default source for packages and their dependencies
here is the another way:
Download and unzip the current pandapower distribution to your local hard drive.
Open a command prompt (e.g. Start–>cmd on Windows) and navigate to the folder that contains the setup.py file with the command cd
cd %path_to_pandapower%\pandapower-x.x.x\
Install pandapower by running
python setup.py install
You can get pandas installed using the Anaconda distribution, which includes the Anaconda prompt. After you open an anaconda prompt, you can run the following command:
conda install pandas
which will install the latest version of pandas, or:
conda install pandas=0.20.3
to get a specific version of the package. Another way to do it is to install it with Miniconda, which allows you to avoid downloading the Anaconda installer and hundreds of other packages. More information can be found here: https://pandas.pydata.org/pandas-docs/version/0.23.4/install.html

Install Tensorflow gpu on a remote pc without sudo

I don't have sudo access to the remote pc where cuda is already installed. Now, I have to install tensorflow-gpu on that system. Please give me the step by step guide to install it without sudo.
Operating System : Ubuntu 18.04
I had to do this before. Basically, I installed miniconda (you can also use anaconda, same thing and installation works without sudo), and installed everything using conda.
Create my environment and activate it:
conda create --name myenv python=3.6.8
conda actiavate myenv
Install the CUDA things and Tensorflow
conda install cudatoolkit=9.0 cudnn=7.1.2 tensorflow-gpu
Depending on your system, you may need to change version numbers.
Not sure how familiar you are with conda - it is basically a package-manager/repository and environment manager like pip/venv with the addition that it can handle non-python things as well (such as cudnn for example). As a note - if a package is not availabe through conda, you can still use pip as a fallback.
Untested with pip
I previously tried to do it without conda and using pip (I ended up failing due to some version conflicts, got frustrated with the process and moved to conda). It gets a little more complicated since you need to manually install it. So first, download cudnn from nvidia and unpack it anywhere you want. Then, you need to add it to the LD_LIBRARY_PATH:
export LD_LIBRARY_PATH=/path/to/cuda/lib64:/path/to/cudnn/lib64/:${LD_ LIBRARY_PATH}

Pillow installed but not identified (Mac OS Yosemite)

I Installed pillow using brew, and when I try to repeat the isntallation I see it's there:
brew install Homebrew/python/pillow
Warning: pillow-2.7.0 already installed
But when I try to load it into a script I get an error:
ImportError: No module named Image
Any suggestions?
python usually looks for Pillow under normal site package installs. Here's what I would do to get a minimal Pillow setup where python should be guaranteed to see it:
sudo easy_install pip
pip install Pillow
I think it may also be possible to just do:
sudo easy_install Pillow
but pip is a bit more user friendly if you're planning on using more python scripts that might have dependencies.
Note: another issue you might be running into is if you're trying to use the Homebrew python but are ending up using the base OSX install of it instead. Make sure which python is showing you what you expect it to be.