pipreqsnb
pipreqsnb copied to clipboard
Cannot find a method to run pipreqsnb in anaconda
Assigned python notebook to variable:
notebook = PureWindowsPath("C:\Users\Henry\Anaconda3\envs\fastai2\varmint_identifier.ipynb") correct_path = Path(notebook) print(correct_path) Output: C:\Users\Henry\Anaconda3\envs\fastai2\varmint_identifier.ipynb
Attempted to create reqs.txt file
pipreqsnb (correct_path --encoding=utf8 --savepath=reqs.txt)
Received an invalid syntax error
File "C:\Users\Henry\AppData\Local\Temp/ipykernel_10728/2599089689.py", line 1 pipreqsnb (correct_path --encoding=utf8 --savepath=reqs.txt)
SyntaxError: invalid syntax (at savepath '='
I'm not fully into windows, but some hints that might help you.
- First be sure that the enviroment in which
pipreqsnbis installed is active. - Then, you should run the command without the parenthesis. For your case it should be something like
pipreqsnb correct_path --encoding=utf8 --savepath=reqs.txt.
If you still are having some trouble please let me know.