Python Forum
I cannot install this library. Can someone show me how?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I cannot install this library. Can someone show me how?
#1
How in the world does one import this file. I have tried many things and nothing so far has worked. I even Googled the subject and again nothing. So how does one install:

official.nlp

It is used in a program as shown:

from official.nlp import optimization  # to create AdamW optimizer
I just need to know how to install it, so I can import it into my program.

Thnaks fo any help.

Respectfully,

LZ
Reply
#2
It would help to know what you tried and what the problems were. What does the library's website say to do? Is it not available in PyPI?
Reply
#3
I think you need to install https://pypi.org/project/tf-models-official/

Depending on what you use, you may need to install more dependencies. look at https://github.com/tensorflow/models/tre...r/official
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#4
I tried :

pip install official.nlp
conda insat;; official.nlp

I tried

pip install official
conda install official


I tried pyforest, the general library installer.

None of them worked.

I have not tried lazy_imports(). I will this afternoon.


Respectfully,

LZ
Reply
#5
Did you open the link PyPI that I shared?
pip install tf-models-official
eventually because of the nlp, you may need to install

pip install tensorflow-text
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#6
Thank you. I will give it a try. It just seems a awkward way to install a library.

R,

LZ
Reply
#7
Why awkward? It's the standard way to do it.
buran likes this post
Reply
#8
(Mar-11-2021, 09:58 PM)Led_Zeppelin Wrote: It just seems a awkward way to install a library.
What is that you find so awkward? Also, it's obvious you didn't write the code yourself, so I expect there were instructions what and how to install.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#9
The fast way.
Go to Colab,New Notebook.
Run.
!pip install -q tf-models-official==2.4.0
Example Notebook.

With Anaconda/conda/pip you should create a new environment,look at this Thread.
This need to install a lot of packages look at requirements.txt around 30.
Then is better to make new virtual environment(see link),so it don't crash with what you have tried to install before.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  PIL Image im.show() no show! Pedroski55 2 978 Sep-12-2022, 10:19 PM
Last Post: Pedroski55
  PIL Image im.show() no show! Pedroski55 6 4,954 Feb-08-2022, 06:32 AM
Last Post: Pedroski55
  Install any library via pip get an error cannot import name 'SCHEME_KEYS' from 'pip. Anldra12 2 10,678 Jan-04-2022, 01:05 PM
Last Post: Anldra12
  Can't install Lcapy library Sancho_Pansa 6 2,798 Oct-23-2020, 12:48 AM
Last Post: Larz60+
  How to install a library in Python? DuoZhou 2 2,974 Apr-27-2018, 02:09 PM
Last Post: DuoZhou
  PyInstaller, how to create library folder instead of library.zip file ? harun2525 2 4,817 May-06-2017, 11:29 AM
Last Post: harun2525

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020