-1

I have create a new conda env. Then after complete the project, I have generated pickle file. Now when I am trying to generated requirements.txt it is not giving me list of all library or packages

(carprediction) F:\Car Dekho Dataset>pip3 freeze > requirements.txt

(carprediction) F:\Car Dekho Dataset>pip freeze > requirements.txt

I have tried both the command still it's not working

Output in file is as follow

certifi==2020.12.5
wincertstore==0.2

Am I doing something wrong ? Blockquote

wincertstore==0.2

  • You can refer to this answer: [From conda create requirements.txt for pip3](https://stackoverflow.com/questions/50777849/from-conda-create-requirements-txt-for-pip3) –  Mar 14 '21 at 11:07
  • I read the answer and tried command written there but still few libraries are missing like numpy, pandas , sklearn – Anubhav Srivastava Mar 14 '21 at 11:55

1 Answers1

0

Check your installed packages using

pip freeze

see if all the packages are showing properly

On the other hand you can try this:

conda list --export > requirements.txt

Works nearly similarly to pip freeze > requirements.txt There's quite some difference between conda and pip. You can read about it here

You can read more about pip and conda in this article

Update 1: the conda command to install numpy is

conda install -c anaconda numpy

activate your conda environment and install numpy and finally run pip freeze to check packages or conda list --export > requirements.txt to list all the packages in requirements.txt

  • I have run pip freeze and actually I am surprised why numpy, pandas, sklearn is not in this env. It is in my system, I guess it is not in this env, which I have created for this project. Could you please help me with that ? – Anubhav Srivastava Mar 15 '21 at 04:34
  • Since you're using conda it might be a good idea to use conda commands to install packages. Atleast that's how I would do it. The conda install package command for numpy is "conda install -c anaconda numpy". Don't forget to activate virtual end first. I'm updating the previous answer with the command –  Mar 15 '21 at 07:35