Python Forum
Installing packages through Anaconda?
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Installing packages through Anaconda?
#1
I have successfully installed the pandas package via Anaconda. At first, I was only able to use pandas when I opened Python via Anaconda. After playing around with it for a bit, I was able to install it such that I can now import pandas and use it without ever having to open Anaconda. I could be wrong, but I think I remember using the command below to install it via cmd:
py -m pip install pandas 
I have tried to install two other packages that came with Anaconda (statsmodels and scipy) via the same method and neither works. I can use both packages, but only if I open python via Anaconda. I would like to be able to use all Anaconda packages without having to access Python through it. Do you have any idea on how to achieve this?

I would copy and paste the error message, but it is several lines long and I am not sure how to copy Python output to clipboard.

Thanks for any advice you can provide.
Reply
#2
which os?
your path most likely points to the Anaconda install.
if so, you will need to use full path to pip of the non anaconda python.
pip resides in the scripts directory.
Reply
#3
(Oct-07-2017, 04:36 AM)Athenaeum Wrote: I have successfully installed the pandas package via Anaconda.
Pandas comes with anaconda,so there is no need to install it only update.
(Oct-07-2017, 04:36 AM)Athenaeum Wrote: I would like to be able to use all Anaconda packages without having to access Python through it. Do you have any idea on how to achieve this?
Anaconda is a stand alone system and can not be used trough OS installed Python.
To take a little about it on Windows,it comes with Navigator and own command line Prompt.
When you install or update in anaconda you use conda
Example conda install requests.
If i start Anaconda Prompt:
(C:\Anaconda3) C:\>conda -V
conda 4.3.28

(C:\Anaconda3) C:\>conda install requests
Fetching package metadata .............
Solving package specifications: .

# All requested packages already installed.
# packages in environment at C:\Anaconda3:
#
requests 2.18.4 py36h4371aae_1

(C:\Anaconda3) C:\>python
Python 3.6.2 |Anaconda, Inc.| (default, Sep 19 2017, 08:03:39) [MSC
Type "help", "copyright", "credits" or "license" for more informati
>>> import pandas
>>> pandas.version()
>>> pandas.__version__
'0.20.3'
>>> exit()

(C:\Anaconda3) C:\>conda install pandas
Fetching package metadata .............
Solving package specifications: .

# All requested packages already installed.
# packages in environment at C:\Anaconda3:
#
pandas 0.20.3 py36hce827b7_2

(C:\Anaconda3) C:\>
I have ordinary Python 3.6 as main OS version,but that is not used at all in demo over.
Reply
#4
I do not want to install or update anything inside Anaconda. What I want to do is use the packages that came with Anaconda within my OS-installed version of Python 3.6 that is separate and outside of Anaconda. I have managed to do this with pandas somehow (and stupidly neglected to remember/record the code I used to do it) via the command prompt. I would like to do it with other packages as well.

I am using Windows 10.
Reply
#5
You did not say which operating system you are using.

I'm not familiar with statsmodels, but scipy needs to be compiled as well as dependancies installed first.

As to copying the error code, the command terminals usually have an option menu accessed by clicking the icon in the upper left corner, this should include an Edit submenu.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#6
I managed to copy and paste the command prompt error message (when trying to install scipy) below. If you don't want to dig through all of it then I completely understand.
I tried the same command as before, except scipy in place of pandas:
py -m pip install pandas
Output:
Microsoft Windows [Version 10.0.15063] (c) 2017 Microsoft Corporation. All rights reserved. C:\Users\user>py -m pip install scipy Collecting scipy Using cached scipy-0.19.1.tar.gz Installing collected packages: scipy Running setup.py install for scipy ... error Complete output from command C:\Users\user\AppData\Local\Programs\Python\Python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\user\\AppData\\Local\\Temp\\pip-build-ujtcejpl\\scipy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\user\AppData\Local\Temp\pip-wf_k4qli-record\install-record.txt --single-version-externally-managed --compile: Note: if you need reliable uninstall behavior, then install with pip instead of using `setup.py install`: - `pip install .` (from a git repo or downloaded source release) - `pip install scipy` (last SciPy release on PyPI) lapack_opt_info: lapack_mkl_info: libraries mkl_rt not found in ['C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python36\\lib', 'C:\\', 'C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python36\\libs'] NOT AVAILABLE openblas_lapack_info: C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\distutils\system_info.py:655: UserWarning: Specified path c:\opt\64\lib is invalid. return self.get_paths(self.section, key) libraries libopenblas_v0.2.20_mingwpy not found in [] NOT AVAILABLE atlas_3_10_threads_info: Setting PTATLAS=ATLAS libraries tatlas,tatlas not found in C:\Users\user\AppData\Local\Programs\Python\Python36\lib libraries lapack_atlas not found in C:\Users\user\AppData\Local\Programs\Python\Python36\lib libraries tatlas,tatlas not found in C:\ libraries lapack_atlas not found in C:\ libraries tatlas,tatlas not found in C:\Users\user\AppData\Local\Programs\Python\Python36\libs libraries lapack_atlas not found in C:\Users\user\AppData\Local\Programs\Python\Python36\libs <class 'numpy.distutils.system_info.atlas_3_10_threads_info'> NOT AVAILABLE atlas_3_10_info: libraries satlas,satlas not found in C:\Users\user\AppData\Local\Programs\Python\Python36\lib libraries lapack_atlas not found in C:\Users\user\AppData\Local\Programs\Python\Python36\lib libraries satlas,satlas not found in C:\ libraries lapack_atlas not found in C:\ libraries satlas,satlas not found in C:\Users\user\AppData\Local\Programs\Python\Python36\libs libraries lapack_atlas not found in C:\Users\user\AppData\Local\Programs\Python\Python36\libs <class 'numpy.distutils.system_info.atlas_3_10_info'> NOT AVAILABLE atlas_threads_info: Setting PTATLAS=ATLAS libraries ptf77blas,ptcblas,atlas not found in C:\Users\user\AppData\Local\Programs\Python\Python36\lib libraries lapack_atlas not found in C:\Users\user\AppData\Local\Programs\Python\Python36\lib libraries ptf77blas,ptcblas,atlas not found in C:\ libraries lapack_atlas not found in C:\ libraries ptf77blas,ptcblas,atlas not found in C:\Users\user\AppData\Local\Programs\Python\Python36\libs libraries lapack_atlas not found in C:\Users\user\AppData\Local\Programs\Python\Python36\libs <class 'numpy.distutils.system_info.atlas_threads_info'> NOT AVAILABLE atlas_info: libraries f77blas,cblas,atlas not found in C:\Users\user\AppData\Local\Programs\Python\Python36\lib libraries lapack_atlas not found in C:\Users\user\AppData\Local\Programs\Python\Python36\lib libraries f77blas,cblas,atlas not found in C:\ libraries lapack_atlas not found in C:\ libraries f77blas,cblas,atlas not found in C:\Users\user\AppData\Local\Programs\Python\Python36\libs libraries lapack_atlas not found in C:\Users\user\AppData\Local\Programs\Python\Python36\libs <class 'numpy.distutils.system_info.atlas_info'> NOT AVAILABLE C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\distutils\system_info.py:572: UserWarning: Atlas (http://math-atlas.sourceforge.net/) libraries not found. Directories to search for the libraries can be specified in the numpy/distutils/site.cfg file (section [atlas]) or by setting the ATLAS environment variable. self.calc_info() lapack_info: libraries lapack not found in ['C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python36\\lib', 'C:\\', 'C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python36\\libs'] NOT AVAILABLE C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\distutils\system_info.py:572: UserWarning: Lapack (http://www.netlib.org/lapack/) libraries not found. Directories to search for the libraries can be specified in the numpy/distutils/site.cfg file (section [lapack]) or by setting the LAPACK environment variable. self.calc_info() lapack_src_info: NOT AVAILABLE C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\distutils\system_info.py:572: UserWarning: Lapack (http://www.netlib.org/lapack/) sources not found. Directories to search for the sources can be specified in the numpy/distutils/site.cfg file (section [lapack_src]) or by setting the LAPACK_SRC environment variable. self.calc_info() NOT AVAILABLE Running from scipy source directory. non-existing path in 'scipy\\integrate': 'quadpack.h' Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Users\user\AppData\Local\Temp\pip-build-ujtcejpl\scipy\setup.py", line 416, in <module> setup_package() File "C:\Users\user\AppData\Local\Temp\pip-build-ujtcejpl\scipy\setup.py", line 412, in setup_package setup(**metadata) File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\distutils\core.py", line 135, in setup config = configuration() File "C:\Users\user\AppData\Local\Temp\pip-build-ujtcejpl\scipy\setup.py", line 336, in configuration config.add_subpackage('scipy') File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\distutils\misc_util.py", line 1029, in add_subpackage caller_level = 2) File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\distutils\misc_util.py", line 998, in get_subpackage caller_level = caller_level + 1) File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\distutils\misc_util.py", line 935, in _get_configuration_from_setup_py config = setup_module.configuration(*args) File "scipy\setup.py", line 15, in configuration config.add_subpackage('linalg') File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\distutils\misc_util.py", line 1029, in add_subpackage caller_level = 2) File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\distutils\misc_util.py", line 998, in get_subpackage caller_level = caller_level + 1) File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\distutils\misc_util.py", line 935, in _get_configuration_from_setup_py config = setup_module.configuration(*args) File "scipy\linalg\setup.py", line 20, in configuration raise NotFoundError('no lapack/blas resources found') numpy.distutils.system_info.NotFoundError: no lapack/blas resources found ---------------------------------------- Command "C:\Users\user\AppData\Local\Programs\Python\Python36\python.exe -u -c "import setuptools, tokenize;__file__= 'C:\\Users\\user\\AppData\\Local\\Temp\\pip-build-ujtcejpl\\scipy\\setup.py';f=getattr(tokenize, 'open', open)(__file__); code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\user\AppData\Local\Temp\pip-wf_k4qli-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\user\AppData\Local\Temp\pip-build-ujtcejpl\scipy\

(Oct-07-2017, 06:23 AM)Larz60+ Wrote: which os?
your path most likely points to the Anaconda install.
if so, you will need to use full path to pip of the non anaconda python.
pip resides in the scripts directory.

Can you please elaborate on path? I assume you mean the filepath for the package I'm trying to install...how do I change the filepath for this?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Installing packages of Conda / Miniconda Liki 12 2,246 Sep-20-2023, 04:57 PM
Last Post: snippsat
  Installing package in Anaconda on an Intranet Computer Secret 1 1,900 Sep-17-2020, 02:16 PM
Last Post: Larz60+
  installing anaconda packages offline HulkHogansArmsArePythons 4 7,285 Feb-18-2020, 08:23 PM
Last Post: jefsummers
  Installing pip packages on Windows 10 tablet jazmad 5 4,148 Oct-24-2018, 10:37 AM
Last Post: jazmad

Forum Jump:

User Panel Messages

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