I use anaconda, and I cannot upgrade with
conda update pytables
it says "already installed".
....
# All requested packages already installed.
# packages in environment at C:\Anaconda:
#
pytables 3.1.1 np19py27_1
Then I tried pip:
C:\Users\HP>pip install --upgrade tables
Collecting tables
Using cached tables-3.2.0.tar.gz
Complete output from command python setup.py egg_info:
H5closecfvx_f.c
r:\temp\H5closecfvx_f.c(2) : warning C4013: 'H5close' undefined; assuming ex
tern returning int
LINK : fatal error LNK1181: cannot open input file 'hdf5dll.lib'
* Using Python 2.7.3 |Anaconda 2.2.0 (32-bit)| (default, Feb 25 2013, 18:26:
30) [MSC v.1500 32 bit (Intel)]
* USE_PKGCONFIG: False
.. ERROR:: Could not find a local HDF5 installation.
You may need to explicitly state where your local HDF5 headers and
library can be found by setting the ``HDF5_DIR`` environment
variable or by using the ``--hdf5`` command-line option.
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in r:\temp\pip-build
-rxtig1\tables
I searched my hard disk, and couldn't find hdf5dll.lib file.
Then I downloaded the latest HDF5-1.8.15 Patch1 and point HDF5_DIR to the installed directory, still same error, and there's no hdf5dll.lib file in the newly installed HDF5 directory either.
EDIT: Since the PR below was merged, pytables is available with
conda install -c conda-forge pytables
Also, this package is available in the defaults channel, but only for numpy 1.11.
pip is a pretty difficult way to line these up. A better approach is probably to build a pytables package. One effort to do so is at https://github.com/conda-forge/staged-recipes/pull/1134
Conda packaging makes it much easier to line up all the library dependencies. It essentially allows the burden of build to be centralized, so that not everyone who installs something needs to know how to build it.
Conda forge is a community effort to collaboratively package our ecosystem.
Related
I need to use the sksparse.chomod package however my pycharm does not let me install it as it can't seem to find it.
I found the sksparse package on github and downloaded it but I do not know how to add a package downloaded from the internet into a conda environment. So, my first question would be can you download a package from github and add it to your conda environment, and how do you do this?
As I did not know how to do the above I instead saved the package within my project and thought I could simply import sksparse.cholmod. However, the line in my code that says import sksparse.cholmod as sks has no errors with it, so I assumed that meant this was ok, but when I try to run my file I get this error:
import sksparse.cholmod as sks
ModuleNotFoundError: No module named 'sksparse.cholmod'
If I have downloaded the package into my project why can't it be found, yet there are no errors when importing?
The cholmod file is a pyx file which I've been told should not be a problem.
Please could anyone help, I am reasonably new to python and I am looking for a straight forward solution that won't be time consuming.
It was an issue with windows, I was able to fix this using the instructions on this link
https://github.com/EmJay276/scikit-sparse
We must follow these steps precisely:
(This was tested with a Anaconda 3 installation and Python 3.7)
Install these requirements in order:
'''
conda install -c conda-forge numpy - tested with v1.19.1
conda install -c anaconda scipy - tested with v1.5.0
conda install -c conda-forge cython - tested with v0.29.21
conda install -c conda-forge suitesparse - tested with v5.4.0
'''
Download Microsoft Build Tools for C++ from https://visualstudio.microsoft.com/de/visual-cpp-build-tools/ (tested with 2019, should work with 2015 or newer)
Install Visual Studio Build Tools
Choose Workloads
Check "C++ Buildtools"
Keep standard settings
Run ''' pip install git+https://github.com/EmJay276/scikit-sparse '''
Test ''' from sksparse.cholmod import cholesky '''
Use all the versions stated for numpy etc, however with scipy I installed the latest version and it worked fine.
I am relatively new to Python coding and want to learn about statistics and data management in Python. For this I would like to install Matplotlib, which is giving me some issues.
I see other people having this issue, but I have not fully understood how to fix it.
To install i use
pip install matplotlib
I have the following specs installed
Windows 10
Python 3.8
Microsoft Studio 2019
The first error i got was to install Microsoft Studio, so I did that.
I have also attempted to update pip
BUILDING MATPLOTLIB
matplotlib: yes [3.1.1]
python: yes [3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:21:23) [MSC v.1916 32 bit (Intel)]]
platform: yes [win32]
...
checkdep_freetype2.c
src/checkdep_freetype2.c(1): fatal error C1083: Cannot open include file: 'ft2build.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.23.28105\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1:
You have python 3.8, not python 3.7.
But there are no python 3.8 wheels available for matplotlib 3.1.1 on pypi. So best remove python 3.8 completely and install python 3.7.
When you then run python -m pip install matplotlib it will install the compiled version from the wheels, so there is no need to compile anything yourself or have Microsoft Studio available.
After spending a lot of time on the issue, this helped me to solve it:
python -m pip install -U matplotlib==3.2.0rc1
FYI: the matplotlib website installation instructions has some info on installing from source.
For Windows it states setting include path and link path:
set CL=/IC:\directory\containing\ft2build.h ...
set LINK=/LIBPATH:C:\directory\containing\freetype.lib ...
As a workaround you may install matplotlib on Windows using the 'Unofficial Windows Binaries for Python Extension Packages' with pip install <downloaded_filename>.
Tested on Python 3.8, Windows 10 and matplotlib-3.2
https://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib
i cant do the isntall of tables lib in my windows enviorment and cant found a solution, the error is about hdf5 intalling and hdf5 directory!
Someone know how can i solve this?
The error is:
C:\Users\thiago.bueno>pip install --upgrade tables
Collecting tables
Using cached https://files.pythonhosted.org/packages/4d/53/8f34ce887c2a2ad8051
8980419a5f6f41defc85a287a355987e559ce9385/tables-3.4.4.tar.gz
Complete output from command python setup.py egg_info:
H5closextvivw_e.c
C:\Users\THIAGO~1.BUE\AppData\Local\Temp\H5closextvivw_e.c(2): warning C4013
: 'H5close' indefinido; assumindo extern retornando int
LINK : fatal error LNK1181: não foi possível abrir o arquivo de entrada 'hdf
5.lib'
* Using Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914
64 bit (AMD64)]
* USE_PKGCONFIG: False
.. ERROR:: Could not find a local HDF5 installation.
You may need to explicitly state where your local HDF5 headers and
library can be found by setting the ``HDF5_DIR`` environment
variable or by using the ``--hdf5`` command-line option.
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\THIAGO~1
.BUE\AppData\Local\Temp\pip-install-k7z1g3z5\tables\
To install PyTables from sources you need a lot of prerequisites.
At PyPI there are w32 and w64 binary wheels for Python 2.7, 3.5 and 3.6. If you can change your Python version you can install precompiled PyTables.
If using conda is an option, conda install pytables will most likely fix the issue in a Windows environment (tested on Windows 10, python 3.9, tables 3.6.1).
Problem
I am trying to install both plotly and cufflinks. However I had a problem.
The installation of both plotly and cufflinks were successful. Although, I can't import cufflinks.
Below is a picture of the problem. It seems to be a dependency error:
I tried manually downloading and installing "talib" but I keep getting failures. (Shown below).
talib\common.c(240): fatal error C1083: Cannot open include file: 'ta_libc.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
Any Ideas? I tried re-installing both modules and Anaconda. Nothing So far.
Other infos:
Cufflinks version: 0.11.0
Plotly version: 2.0.10
Anaconda version: 3-4.4.0 (But I don't think it have anything to do with it)
Python version: 3.6.1
try installing this version of cufflinks, it eliminated the error for me.
pip install cufflinks==0.8.2
From this link: github.com/mrjbq7/ta-lib#troubleshooting
Troubleshooting
Sometimes installation will produce build errors like this:
func.c:256:28: fatal error: ta-lib/ta_libc.h: No such file or directory
compilation terminated.
This typically means that it can't find the underlying TA-Lib library, a dependency which needs to be installed. On Windows, this could be caused by installing the 32-bit binary distribution of the underlying TA-Lib library, but trying to use it with 64-bit Python.
Windows
Download ta-lib-0.4.0-msvc.zip and unzip to C:\ta-lib
This is a 32-bit release. If you want to use 64-bit Python, you will need to build a 64-bit version of the library.
My Fix
So, for windows, we need a 64-bit version of the library? Luckly I found a lot of modules built for 32 and 64 bits python:
http://www.lfd.uci.edu/~gohlke/pythonlibs/
search for "ta-lib" and click on the module you need (In my case cp36 64 bits).
Then, open the command prompt.
Change to where you downloaded the file: cd path/to/file
Type: pip install NameOfFile (in my case pip install TA_Lib‑0.4.10‑cp36‑cp36m‑win_amd64.whl )
Now the 64-bits Ta-Lib module should be installed in your machine. I tested the previous line of codes and it worked!
Thanks for the help :)
I have now removed all dependencies on talib. All studies are pure python based now and you should not face any of this errors.
I'm working on a Django project that is using an ldap authentication module. This is working on our server but I am running into issues getting this running on my windows dev machine.
My environment is using virtualevn and when trying to install pip python-ldap I receive the following message:
error: Unable to find vcvarsall.bat
Does anyone have any idea what could be going wrong?
To expand on #Brandon's answer, to install using the pre-built wheel:
Ensure you have pip 19.2+ installed:
$ pip --version
pip 19.2.3
Check your Python version and architecture (32/64 bit) https://stackoverflow.com/a/10966396/1026:
$ python -c 'import sys; print(sys.version)'
3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]
Download the matching pre-built *.whl from https://www.lfd.uci.edu/~gohlke/pythonlibs/#python-ldap
For example given the above Python I picked "python_ldap‑3.2.0‑cp37‑cp37m‑win_amd64.whl"
Install it with:
pip install path\to\your.whl
Unfortunately, many Python modules have trouble installing on Windows. The error you're receiving is one that I was never able to get fixed, even given the vast amount of information available on the web. Give this link a try for a pre-compiled version: http://www.lfd.uci.edu/~gohlke/pythonlibs/#python-ldap