Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Hello, I Have An Error While Installing Git Dependencies Of Local Package: So Far I Used Task.

Hello, I have an error while installing git dependencies of local package:
So far I used task. update _requirements(“[.]“) with my local package referencing in install_requires: [“private_dep @ git+ https://github.com/my-org/private-dep ”]
I replaced the later with:
install_requires: [“git+ https://github.com/my-org/private-dep ”]
And I am now getting the error:
error in my-package setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Parse error at "'+https:/'": Expected stringEnd

  
  
Posted 3 years ago
Votes Newest

Answers 20


yes, because it won’t install the local package which has this setup.py with the problem in its install_requires described in my previous message

  
  
Posted 3 years ago

error in my-package setup command:

Okay this seems like an error in the setup.py you have in the "mypackage" folder

  
  
Posted 3 years ago

JitteryCoyote63 you mean? (notice no brackets)
task.update_requirements(".") Either pass a text or a list of lines:
The safest would be '\n'.join(all_req_lines)

  
  
Posted 3 years ago

Ohh so the setup.py is the one containing these requirements, oops I totally missed that :( let me check what pep has to say about that ... (Basically this is not a clearml issue but a pip one...)

  
  
Posted 3 years ago

Could you post what you see under "installed packages" in the UI ?

  
  
Posted 3 years ago

I am already trying with latest of pip 😞

  
  
Posted 3 years ago

torch==1.7.1 git+ .

  
  
Posted 3 years ago

yes, the only thing I changed is:
install_requires=[ ... "my-dep @ git+ ]to:
install_requires=[ ... "git+ "]

  
  
Posted 3 years ago

No worries, you open the issue on pypa/pip and I will do my best to push forward 🙂
We also have to be realistic I have a PR that is waiting for almost a year now (that said it is a major one and needed to wait until a few more features were merged), basically what I'm saying best case scenario is a month to get a PR merged

  
  
Posted 3 years ago

Try:
task.update_requirements('\n'.join([".", ])) 

  
  
Posted 3 years ago

but if you do that and the package is already installed it will not install using the git repo, this is an issue with pip

Exactly, that’s my problem: I want to remove it to make sure it is reinstalled (because the version can change)

I think that since the agent installs everything from scratch it should work for you. Wdyt?

With env caching enabled, it won’t reinstall this private dependency, right?

  
  
Posted 3 years ago

JitteryCoyote63 see here https://stackoverflow.com/questions/55385900/pip3-setup-py-install-requires-pep-508-git-url-for-private-repo bottom line, you have to add package@ before the link, but if you do that and the package is already installed it will not install using the git repo, this is an issue with pip. I think that since the agent installs everything from scratch it should work for you. Wdyt?

  
  
Posted 3 years ago

With env caching enabled, it won’t reinstall this private dependency, right?

It will, local packages (".") and git packages are alwyas reinstalled even if using venv caching, exactly for that reason 🙂

  
  
Posted 3 years ago

oh dear 😞 if that's the case I think you should open an Issue on pypa/pip , I'm not sure what we can do other than that ...

  
  
Posted 3 years ago

Exactly, that’s my problem: I want to remove it to make sure it is reinstalled (because the version can change)

JitteryCoyote63 yes, this is definitely a pip bug... can you test with the latest pip version, maybe it was fixed? (i.e. git+https:// link)

  
  
Posted 3 years ago

Still failing with the same error 😞

  
  
Posted 3 years ago

Sorry, its actually
task.update_requirements(["."]) 

  
  
Posted 3 years ago

and when you remove the "." line does it work?

  
  
Posted 3 years ago

That would be awesome, yes, only from my side I have 0 knowledge of the pip codebase 😄

  
  
Posted 3 years ago

If we have the time maybe we could PR a fix?!

  
  
Posted 3 years ago