
There is no need to point to an environment/ pathįor future reference, you can find the folder your packages are downloading to if you happen to have a requirement already satisfied.
INSTALL NEW LIBRARY IN ANACONDA INSTALL
INSTALL NEW LIBRARY IN ANACONDA CODE
If it is version 10.x.x or above, then install your python package with this line of code subprocess.check_call() If you have pip installed in anaconda you can run the following in jupyter notebook or in your python shell that is linked to anaconda pip.main()Ĭheck your version of pip with pip._version_. Since some of the conda packages may lack support overtime it is required to install using pip and this is one way to do it It will automatically install to the anaconda environment without having to use conda install package-name This should now successfully install packages using that virtual environment’s pip! Solution 2:Īll you have to do is open Anaconda Prompt and type pip install package-name Install new packages by doing /anaconda/envs/venv_name/bin/pip install package_name. It should be somewhere like /anaconda/envs/venv_name/. This will install pip to your venv directory.įind your anaconda directory, and find the actual venv folder. Run conda create -n venv_name and source activate venv_name, where venv_name is the name of your virtual environment. How to solve the problem: Solution 1:įor others who run into this situation, I found this to be the most straightforward solution: Now, I always run unset PYTHONPATH when using a conda environment, and it works much better. The system seems to always look in the PYTHONPATH locations even when you’re using a conda environment. What I have found is that the conda env doesn’t play well with the PYTHONPATH. Output of which -a pip: /usr/local/bin/pip Just a note, I know you can use conda install for the packages, but I have had an issue with Pillow from anaconda, so I wanted to get it from pip, and since the docs say that is fine. So it seems the environment is not working correctly, definitely not like it said in the docs. So I can see it thinks the requirement is satisfied from the system-wide package. Requirement already satisfied (use -upgrade to upgrade): Pillow in /Library/Python/2.7/site-packages Problem is coming up, when I try to install a package using pip: (shrink_venv): pip install Pillow I then can see in the terminal that I am working in my env (shrink_venv). I created an empty environment in Ananconda like this: conda create -n shrink_venv It is done the same way as for virtualenv. In the Anaconda docs it says this is perfectly fine. I am trying to install packages from pip to a fresh environment (virtual) created using anaconda. Question or problem about Python programming:
