Can't install Azure packages with pip: ruamel.yaml error - azure

I'm having trouble installing the following packages in a new python 3.9.7 virtual environment on Arch Linux.
My requirements.txt file:
joblib
python-dotenv
azure-cli==2.29.2
azureml-core
Steps to reproduce:
python3 -m venv venv
source venv/bin/activate
pip install -U pip
pip install -r requirements.txt
Here's the relevant part of the output of the last command, it errors when trying to install ruamel.yaml:
Using legacy 'setup.py install' for ruamel.yaml, since package 'wheel' is not installed.
Installing collected packages: pycparser, urllib3, idna, chardet, cffi, certifi, six, requests, PyJWT, oauthlib, cryptography, requests-oauthlib, python-dateutil, isodate, azure-nspkg, wrapt, tabulate, pyyaml, PySocks, pyopenssl, PyNaCl, pygments, portalocker, msrest, msal, MarkupSafe, jmespath, colorama, bcrypt, azure-mgmt-nspkg, azure-core, argcomplete, applicationinsights, adal, websocket-client, vsts, pyparsing, pyasn1, psutil, pkginfo, pathlib2, paramiko, msrestazure, msal-extensions, knack, jinja2, jeepney, invoke, humanfriendly, deprecated, backports.weakref, azure-mgmt-datalake-nspkg, azure-mgmt-core, azure-common, azure-cli-telemetry, xmltodict, sshtunnel, semver, SecretStorage, scp, ruamel.yaml, pytz, PyGithub, pathspec, packaging, ndg-httpsclient, jsonpickle, jsondiff, javaproperties, fabric, docker, distro, contextlib2, backports.tempfile, azure-synapse-spark, azure-synapse-managedprivateendpoints, azure-synapse-artifacts, azure-synapse-accesscontrol, azure-storage-common, azure-multiapi-storage, azure-mgmt-web, azure-mgmt-trafficmanager, azure-mgmt-synapse, azure-mgmt-storage, azure-mgmt-sqlvirtualmachine, azure-mgmt-sql, azure-mgmt-signalr, azure-mgmt-servicefabricmanagedclusters, azure-mgmt-servicefabric, azure-mgmt-servicebus, azure-mgmt-security, azure-mgmt-search, azure-mgmt-resource, azure-mgmt-reservations, azure-mgmt-relay, azure-mgmt-redis, azure-mgmt-redhatopenshift, azure-mgmt-recoveryservicesbackup, azure-mgmt-recoveryservices, azure-mgmt-rdbms, azure-mgmt-privatedns, azure-mgmt-policyinsights, azure-mgmt-network, azure-mgmt-netapp, azure-mgmt-msi, azure-mgmt-monitor, azure-mgmt-media, azure-mgmt-marketplaceordering, azure-mgmt-maps, azure-mgmt-managementgroups, azure-mgmt-managedservices, azure-mgmt-loganalytics, azure-mgmt-kusto, azure-mgmt-keyvault, azure-mgmt-iothubprovisioningservices, azure-mgmt-iothub, azure-mgmt-iotcentral, azure-mgmt-imagebuilder, azure-mgmt-hdinsight, azure-mgmt-extendedlocation, azure-mgmt-eventhub, azure-mgmt-eventgrid, azure-mgmt-dns, azure-mgmt-devtestlabs, azure-mgmt-deploymentmanager, azure-mgmt-datamigration, azure-mgmt-datalake-store, azure-mgmt-datalake-analytics, azure-mgmt-databoxedge, azure-mgmt-cosmosdb, azure-mgmt-containerservice, azure-mgmt-containerregistry, azure-mgmt-containerinstance, azure-mgmt-consumption, azure-mgmt-compute, azure-mgmt-cognitiveservices, azure-mgmt-cdn, azure-mgmt-botservice, azure-mgmt-billing, azure-mgmt-batchai, azure-mgmt-batch, azure-mgmt-authorization, azure-mgmt-applicationinsights, azure-mgmt-appconfiguration, azure-mgmt-apimanagement, azure-mgmt-advisor, azure-loganalytics, azure-keyvault-keys, azure-keyvault-administration, azure-keyvault, azure-identity, azure-graphrbac, azure-functions-devops-build, azure-datalake-store, azure-cosmos, azure-cli-core, azure-batch, azure-appconfiguration, antlr4-python3-runtime, python-dotenv, joblib, azureml-core, azure-cli
Running setup.py install for ruamel.yaml: started
Running setup.py install for ruamel.yaml: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /home/zjeffer/Documents/school/howest-mct/semester5/mlops/labo/project/mlops-project/venv/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ouy4o2zq/ruamel-yaml_763ae0866f7e4425a0965a00130752b0/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ouy4o2zq/ruamel-yaml_763ae0866f7e4425a0965a00130752b0/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-8y_97owt/install-record.txt --single-version-externally-managed --compile --install-headers /home/zjeffer/Documents/school/howest-mct/semester5/mlops/labo/project/mlops-project/venv/include/site/python3.9/ruamel.yaml
cwd: /tmp/pip-install-ouy4o2zq/ruamel-yaml_763ae0866f7e4425a0965a00130752b0/
Complete output (649 lines):
sys.argv ['/tmp/pip-install-ouy4o2zq/ruamel-yaml_763ae0866f7e4425a0965a00130752b0/setup.py', 'install', '--record', '/tmp/pip-record-8y_97owt/install-record.txt', '--single-version-externally-managed', '--compile', '--install-headers', '/home/zjeffer/Documents/school/howest-mct/semester5/mlops/labo/project/mlops-project/venv/include/site/python3.9/ruamel.yaml']
test compiling test_ruamel_yaml
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/ruamel
copying .ruamel/__init__.py -> build/lib.linux-x86_64-3.9/ruamel
creating build/lib.linux-x86_64-3.9/ruamel/yaml
copying ./main.py -> build/lib.linux-x86_64-3.9/ruamel/yaml
copying ./util.py -> build/lib.linux-x86_64-3.9/ruamel/yaml
copying ./tokens.py -> build/lib.linux-x86_64-3.9/ruamel/yaml
copying ./scalarfloat.py -> build/lib.linux-x86_64-3.9/ruamel/yaml
copying ./scanner.py -> build/lib.linux-x86_64-3.9/ruamel/yaml
copying ./comments.py -> build/lib.linux-x86_64-3.9/ruamel/yaml
copying ./loader.py -> build/lib.linux-x86_64-3.9/ruamel/yaml
copying ./serializer.py -> build/lib.linux-x86_64-3.9/ruamel/yaml
copying ./resolver.py -> build/lib.linux-x86_64-3.9/ruamel/yaml
copying ./nodes.py -> build/lib.linux-x86_64-3.9/ruamel/yaml
copying ./dumper.py -> build/lib.linux-x86_64-3.9/ruamel/yaml
copying ./configobjwalker.py -> build/lib.linux-x86_64-3.9/ruamel/yaml
copying ./timestamp.py -> build/lib.linux-x86_64-3.9/ruamel/yaml
copying ./error.py -> build/lib.linux-x86_64-3.9/ruamel/yaml
copying ./reader.py -> build/lib.linux-x86_64-3.9/ruamel/yaml
copying ./cyaml.py -> build/lib.linux-x86_64-3.9/ruamel/yaml
copying ./parser.py -> build/lib.linux-x86_64-3.9/ruamel/yaml
copying ./__init__.py -> build/lib.linux-x86_64-3.9/ruamel/yaml
copying ./representer.py -> build/lib.linux-x86_64-3.9/ruamel/yaml
copying ./events.py -> build/lib.linux-x86_64-3.9/ruamel/yaml
copying ./scalarbool.py -> build/lib.linux-x86_64-3.9/ruamel/yaml
copying ./composer.py -> build/lib.linux-x86_64-3.9/ruamel/yaml
copying ./scalarint.py -> build/lib.linux-x86_64-3.9/ruamel/yaml
copying ./emitter.py -> build/lib.linux-x86_64-3.9/ruamel/yaml
copying ./anchor.py -> build/lib.linux-x86_64-3.9/ruamel/yaml
copying ./compat.py -> build/lib.linux-x86_64-3.9/ruamel/yaml
copying ./constructor.py -> build/lib.linux-x86_64-3.9/ruamel/yaml
copying ./scalarstring.py -> build/lib.linux-x86_64-3.9/ruamel/yaml
copying ./LICENSE -> build/lib.linux-x86_64-3.9/ruamel/yaml
running build_ext
building '_ruamel_yaml' extension
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/ext
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC -I/home/zjeffer/Documents/school/howest-mct/semester5/mlops/labo/project/mlops-project/venv/include -I/usr/include/python3.9 -c ext/_ruamel_yaml.c -o build/temp.linux-x86_64-3.9/ext/_ruamel_yaml.o
In file included from ext/_ruamel_yaml.c:523:
ext/_ruamel_yaml.h:10: warning: "PyString_CheckExact" redefined
<a whole bunch of compiling errors & warnings>
The full log file can be found here
Note the line Using legacy 'setup.py install' for ruamel.yaml, since package 'wheel' is not installed.. If I first install the wheel package, the same error appears when installing the packages.
Installing ruamel.yaml manually works fine, but the azure packages still can't be installed.
EDIT: Installing every package one by one installs everything without errors. Why?
Changing step 3 to pip install -U pip wheel ruamel.yaml doesn't change anything.

The ruamel.yaml documentation states that it should be installed using:
pip install ruamel.yaml
so using the legacy [python] setup.py install should not be used.
Your full log indicates that it is tried to install two versions of ruamel.yaml:
Collecting ruamel.yaml<=0.17.16,>=0.17.10
Using cached ruamel.yaml-0.17.16-py3-none-any.whl (109 kB)
and
Collecting ruamel.yaml<=0.15.89,>=0.15.35
Using cached ruamel.yaml-0.15.89.tar.gz (306 kB)
Apart from a potential problem with two versions being installed, the second one will not succeed as the 0.15 ruamel.yaml series (the last one uploaded to PyPI in July 2019) doesn't support Python 3.9 first released in Oct 2020.
So when you install each package step by step, you get the latest version or ruamel.yaml. Why that step by step installation doesn't at with some package tries to install ruamel.yaml==0.15.89 as a dependency is unclear.
When I install the four packages listed in your requirements.txt, then ruamel.yaml doesn't get installed but pipdeptree indicates that azureml-core==1.36.0.post2 has possible conflicting dependencies.
When I use your requirements.txt I get the same error.
When I use your requirements.txt in a Python 3.7 venv (so that the old ruamel.yaml wheel can be installed) installation works. From that you can see that the package azureml-core==1.14.0 is installed instead of the azureml-core==1.36.0.post2

Related

autoPyTorch installation error in windows

Doing
pip install autoPyTorch
from https://pypi.org/project/autoPyTorch/
in windows
Requirement already satisfied: typing-extensions in c:\users\ga\anaconda3\envs\automlpy395\lib\site-packages (from torch->autoPyTorch) (3.7.4.3)
Building wheels for collected packages: ConfigSpace, netifaces
Building wheel for ConfigSpace (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\GA\anaconda3\envs\autoMLpy395\python.exe' 'C:\Users\GA\anaconda3\envs\autoMLpy395\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' build_wheel 'C:\Users\G~1\AppData\Local\Temp\tmpiv0eeai5'
cwd: C:\Users\GA\AppData\Local\Temp\pip-install-78zfdmqt\configspace_985d1975f54b489c8878a152ed6c7358
Complete output (40 lines):
C:\Users\GA\AppData\Local\Temp\pip-build-env-c1p7qiob\overlay\Lib\site-packages\setuptools\dist.py:717: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
warnings.warn(
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\ConfigSpace
copying ConfigSpace\exceptions.py -> build\lib.win-amd64-3.9\ConfigSpace
copying ConfigSpace\__init__.py -> build\lib.win-amd64-3.9\ConfigSpace
copying ConfigSpace\__version__.py -> build\lib.win-amd64-3.9\ConfigSpace
creating build\lib.win-amd64-3.9\ConfigSpace\nx
copying ConfigSpace\nx\exception.py -> build\lib.win-amd64-3.9\ConfigSpace\nx
copying ConfigSpace\nx\release.py -> build\lib.win-amd64-3.9\ConfigSpace\nx
copying ConfigSpace\nx\__init__.py -> build\lib.win-amd64-3.9\ConfigSpace\nx
creating build\lib.win-amd64-3.9\ConfigSpace\read_and_write
copying ConfigSpace\read_and_write\json.py -> build\lib.win-amd64-3.9\ConfigSpace\read_and_write
copying ConfigSpace\read_and_write\pcs.py -> build\lib.win-amd64-3.9\ConfigSpace\read_and_write
copying ConfigSpace\read_and_write\pcs_new.py -> build\lib.win-amd64-3.9\ConfigSpace\read_and_write
copying ConfigSpace\read_and_write\__init__.py -> build\lib.win-amd64-3.9\ConfigSpace\read_and_write
creating build\lib.win-amd64-3.9\ConfigSpace\nx\algorithms
copying ConfigSpace\nx\algorithms\cycles.py -> build\lib.win-amd64-3.9\ConfigSpace\nx\algorithms
copying ConfigSpace\nx\algorithms\dag.py -> build\lib.win-amd64-3.9\ConfigSpace\nx\algorithms
copying ConfigSpace\nx\algorithms\__init__.py -> build\lib.win-amd64-3.9\ConfigSpace\nx\algorithms
creating build\lib.win-amd64-3.9\ConfigSpace\nx\classes
copying ConfigSpace\nx\classes\digraph.py -> build\lib.win-amd64-3.9\ConfigSpace\nx\classes
copying ConfigSpace\nx\classes\graph.py -> build\lib.win-amd64-3.9\ConfigSpace\nx\classes
copying ConfigSpace\nx\classes\__init__.py -> build\lib.win-amd64-3.9\ConfigSpace\nx\classes
creating build\lib.win-amd64-3.9\ConfigSpace\nx\algorithms\components
copying ConfigSpace\nx\algorithms\components\strongly_connected.py -> build\lib.win-amd64-3.9\ConfigSpace\nx\algorithms\components
copying ConfigSpace\nx\algorithms\components\__init__.py -> build\lib.win-amd64-3.9\ConfigSpace\nx\algorithms\components
running build_ext
cythoning ConfigSpace/hyperparameters.pyx to ConfigSpace\hyperparameters.c
cythoning ConfigSpace/forbidden.pyx to ConfigSpace\forbidden.c
cythoning ConfigSpace/conditions.pyx to ConfigSpace\conditions.c
cythoning ConfigSpace/c_util.pyx to ConfigSpace\c_util.c
cythoning ConfigSpace/util.pyx to ConfigSpace\util.c
cythoning ConfigSpace/configuration_space.pyx to ConfigSpace\configuration_space.c
building 'ConfigSpace.hyperparameters' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Failed building wheel for ConfigSpace
Building wheel for netifaces (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\GA\anaconda3\envs\autoMLpy395\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\GA\\AppData\\Local\\Temp\\pip-install-78zfdmqt\\netifaces_1ad66342d17444d8b393a67c1a88ba94\\setup.py'"'"'; __file__='"'"'C:\\Users\\GA\\AppData\\Local\\Temp\\pip-install-78zfdmqt\\netifaces_1ad66342d17444d8b393a67c1a88ba94\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\GA\AppData\Local\Temp\pip-wheel-t35_qwhh'
cwd: C:\Users\GA\AppData\Local\Temp\pip-install-78zfdmqt\netifaces_1ad66342d17444d8b393a67c1a88ba94\
Complete output (5 lines):
running bdist_wheel
running build
running build_ext
building 'netifaces' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Failed building wheel for netifaces
Running setup.py clean for netifaces
Failed to build ConfigSpace netifaces
ERROR: Could not build wheels for ConfigSpace which use PEP 517 and cannot be installed directly
I have tried
pip install --no-use-pep517 autoPyTorch
not worked
Tried installing torch first, installed successfully
pip3 install torch torchvision torchaudio
but autoPyTorch throwing same error
System requirements
Auto-PyTorch has the following system requirements:
Linux operating system (for example Ubuntu)
Python (>=3.6) (get Python here).
C++ compiler (with C++11 supports)
SWIG (version 3.0.* is required; >=4.0.0 is not supported)
Github AutoPytorch Installation.rst

Installing TA-Lib on Macbook

I'm trying to get install TA-lib, but running into errors I don't understand.
I installed brew, and ran the following:
brew install ta-lib
That seemed to work because if I re-run that, I get a note that
ta-lib 0.4.0 is already installed and up-to-date
However, running pip3 install ta-lib results in the following errors. From googling around, this seems to happen when ta-lib wasn't installed first, but not sure how to address when the initial install seems to go fine.
pip3 install TA-lib
Collecting TA-lib
Using cached TA-Lib-0.4.19.tar.gz (267 kB)
Requirement already satisfied: numpy in /Users/mf/venv/lib/python3.8/site-packages (from TA-lib) (1.19.5)
Using legacy 'setup.py install' for TA-lib, since package 'wheel' is not installed.
Installing collected packages: TA-lib
Running setup.py install for TA-lib ... error
ERROR: Command errored out with exit status 1:
command: /Users/mf/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/p3/nd5fr9yd2xb7qnjnln6vk2cw0000gn/T/pip-install-armqiybl/ta-lib_03c018e0f8f24266a3c6fc47436cf143/setup.py'"'"'; __file__='"'"'/private/var/folders/p3/nd5fr9yd2xb7qnjnln6vk2cw0000gn/T/pip-install-armqiybl/ta-lib_03c018e0f8f24266a3c6fc47436cf143/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/p3/nd5fr9yd2xb7qnjnln6vk2cw0000gn/T/pip-record-q2zdmts7/install-record.txt --single-version-externally-managed --compile --install-headers /Users/mf/venv/include/site/python3.8/TA-lib
cwd: /private/var/folders/p3/nd5fr9yd2xb7qnjnln6vk2cw0000gn/T/pip-install-armqiybl/ta-lib_03c018e0f8f24266a3c6fc47436cf143/
Complete output (27 lines):
/private/var/folders/p3/nd5fr9yd2xb7qnjnln6vk2cw0000gn/T/pip-install-armqiybl/ta-lib_03c018e0f8f24266a3c6fc47436cf143/setup.py:71: UserWarning: Cannot find ta-lib library, installation may fail.
warnings.warn('Cannot find ta-lib library, installation may fail.')
running install
running build
running build_py
creating build
creating build/lib.macosx-10.14.6-x86_64-3.8
creating build/lib.macosx-10.14.6-x86_64-3.8/talib
copying talib/abstract.py -> build/lib.macosx-10.14.6-x86_64-3.8/talib
copying talib/test_abstract.py -> build/lib.macosx-10.14.6-x86_64-3.8/talib
copying talib/deprecated.py -> build/lib.macosx-10.14.6-x86_64-3.8/talib
copying talib/__init__.py -> build/lib.macosx-10.14.6-x86_64-3.8/talib
copying talib/stream.py -> build/lib.macosx-10.14.6-x86_64-3.8/talib
copying talib/test_pandas.py -> build/lib.macosx-10.14.6-x86_64-3.8/talib
copying talib/test_data.py -> build/lib.macosx-10.14.6-x86_64-3.8/talib
copying talib/test_func.py -> build/lib.macosx-10.14.6-x86_64-3.8/talib
copying talib/test_stream.py -> build/lib.macosx-10.14.6-x86_64-3.8/talib
running build_ext
building 'talib._ta_lib' extension
creating build/temp.macosx-10.14.6-x86_64-3.8
creating build/temp.macosx-10.14.6-x86_64-3.8/talib
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -I/usr/include -I/usr/local/include -I/opt/include -I/opt/local/include -I/Users/mf/venv/lib/python3.8/site-packages/numpy/core/include -I/Users/mf/venv/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -c talib/_ta_lib.c -o build/temp.macosx-10.14.6-x86_64-3.8/talib/_ta_lib.o
talib/_ta_lib.c:611:10: fatal error: 'ta-lib/ta_defs.h' file not found
#include "ta-lib/ta_defs.h"
^~~~~~~~~~~~~~~~~~
1 error generated.
error: command 'clang' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/mf/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/p3/nd5fr9yd2xb7qnjnln6vk2cw0000gn/T/pip-install-armqiybl/ta-lib_03c018e0f8f24266a3c6fc47436cf143/setup.py'"'"'; __file__='"'"'/private/var/folders/p3/nd5fr9yd2xb7qnjnln6vk2cw0000gn/T/pip-install-armqiybl/ta-lib_03c018e0f8f24266a3c6fc47436cf143/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/p3/nd5fr9yd2xb7qnjnln6vk2cw0000gn/T/pip-record-q2zdmts7/install-record.txt --single-version-externally-managed --compile --install-headers /Users/mf/venv/include/site/python3.8/TA-lib Check the logs for full command output.
I updated TA_LIBRARY_PATH & TA_INCLUDE_PATH after finding where brew was installing ta-lib, ran the following and pip3 install seemed to work properly, but I wasn't able to actually import it. After trying to re-install ta-lib, I get the same error as above.
export TA_LIBRARY_PATH=/opt/homebrew/opt/ta-lib/lib
export TA_INCLUDE_PATH=/opt/homebrew/opt/ta-lib/include

Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/?

trying to install fastai using pip but the following error is shown
i have installed visual studio build tools 2019 but still cant install fastai using pip.
Installing collected packages: bottleneck, nvidia-ml-py3, fastai
Running setup.py install for bottleneck ... error
ERROR: Command errored out with exit status 1:
command: 'c:\program files\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\icarus\\AppData\\Local\\Temp\\pip-install-9snii33_\\bottleneck\\setup.py'"'"'; __file__='"'"'C:\\Users\\icarus\\AppData\\Local\\Temp\\pip-install-9snii33_\\bottleneck\\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\icarus\AppData\Local\Temp\pip-record-bpmup82o\install-record.txt' --single-version-externally-managed --compile
cwd: C:\Users\icarus\AppData\Local\Temp\pip-install-9snii33_\bottleneck\
Complete output (36 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\bottleneck
copying bottleneck\version.py -> build\lib.win-amd64-3.7\bottleneck
copying bottleneck\__init__.py -> build\lib.win-amd64-3.7\bottleneck
creating build\lib.win-amd64-3.7\bottleneck\benchmark
copying bottleneck\benchmark\autotimeit.py -> build\lib.win-amd64-3.7\bottleneck\benchmark
copying bottleneck\benchmark\bench.py -> build\lib.win-amd64-3.7\bottleneck\benchmark
copying bottleneck\benchmark\bench_detailed.py -> build\lib.win-amd64-3.7\bottleneck\benchmark
copying bottleneck\benchmark\__init__.py -> build\lib.win-amd64-3.7\bottleneck\benchmark
creating build\lib.win-amd64-3.7\bottleneck\slow
copying bottleneck\slow\move.py -> build\lib.win-amd64-3.7\bottleneck\slow
copying bottleneck\slow\nonreduce.py -> build\lib.win-amd64-3.7\bottleneck\slow
copying bottleneck\slow\nonreduce_axis.py -> build\lib.win-amd64-3.7\bottleneck\slow
copying bottleneck\slow\reduce.py -> build\lib.win-amd64-3.7\bottleneck\slow
copying bottleneck\slow\__init__.py -> build\lib.win-amd64-3.7\bottleneck\slow
creating build\lib.win-amd64-3.7\bottleneck\src
copying bottleneck\src\template.py -> build\lib.win-amd64-3.7\bottleneck\src
copying bottleneck\src\__init__.py -> build\lib.win-amd64-3.7\bottleneck\src
creating build\lib.win-amd64-3.7\bottleneck\tests
copying bottleneck\tests\input_modifcation_test.py -> build\lib.win-amd64-3.7\bottleneck\tests
copying bottleneck\tests\list_input_test.py -> build\lib.win-amd64-3.7\bottleneck\tests
copying bottleneck\tests\move_test.py -> build\lib.win-amd64-3.7\bottleneck\tests
copying bottleneck\tests\nonreduce_axis_test.py -> build\lib.win-amd64-3.7\bottleneck\tests
copying bottleneck\tests\nonreduce_test.py -> build\lib.win-amd64-3.7\bottleneck\tests
copying bottleneck\tests\reduce_test.py -> build\lib.win-amd64-3.7\bottleneck\tests
copying bottleneck\tests\scalar_input_test.py -> build\lib.win-amd64-3.7\bottleneck\tests
copying bottleneck\tests\util.py -> build\lib.win-amd64-3.7\bottleneck\tests
copying bottleneck\tests\__init__.py -> build\lib.win-amd64-3.7\bottleneck\tests
copying bottleneck\LICENSE -> build\lib.win-amd64-3.7\bottleneck
running build_ext
building 'bottleneck.reduce' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\program files\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\icarus\\AppData\\Local\\Temp\\pip-install-9snii33_\\bottleneck\\setup.py'"'"'; __file__='"'"'C:\\Users\\icarus\\AppData\\Local\\Temp\\pip-install-9snii33_\\bottleneck\\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\icarus\AppData\Local\Temp\pip-record-bpmup82o\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
any kind of help will be appreciated
You may not have the right path variable setup. Visual Studio build tools install scripts that you need to run in order to get the right variables in your shell.
This said, on Windows, unless you really want to compile your own version, I would recommend to install it with conda.
First install pytorch using the conda command listed here: https://pytorch.org/get-started/locally/
If you have a GPU:
conda install pytorch torchvision cudatoolkit=10.0 -c pytorch
If you use CPU:
conda install pytorch torchvision cpuonly -c pytorch
Then install fastai:
conda install -c fastai fastai
This method works fine on Windows and won't require a compiler.

Error while installing Quandl for python3

I'm using LinuxMint and there is almost a week that I'm trying to install Quandl for python3 using pip3 install but always I get the same error(even trying install for python2):
$ pip3 install Quandl
Collecting Quandl
Using cached Quandl-3.0.1-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): requests>=2.7.0 in /usr/lib/python3/dist-packages (from Quandl)
Requirement already satisfied (use --upgrade to upgrade): six in ./.local/lib/python3.5/site-packages (from Quandl)
Collecting ndg-httpsclient (from Quandl)
Using cached ndg_httpsclient-0.4.1.tar.gz
Collecting pyOpenSSL (from Quandl)
Using cached pyOpenSSL-16.0.0-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): pandas>=0.14 in /usr/local/lib/python3.5/dist-packages (from Quandl)
Requirement already satisfied (use --upgrade to upgrade): numpy>=1.8 in ./.local/lib/python3.5/site-packages (from Quandl)
Requirement already satisfied (use --upgrade to upgrade): pyasn1 in /usr/lib/python3/dist-packages (from Quandl)
Requirement already satisfied (use --upgrade to upgrade): more-itertools in /usr/local/lib/python3.5/dist-packages (from Quandl)
Requirement already satisfied (use --upgrade to upgrade): python-dateutil in ./.local/lib/python3.5/site-packages (from Quandl)
Requirement already satisfied (use --upgrade to upgrade): inflection>=0.3.1 in /usr/local/lib/python3.5/dist-packages (from Quandl)
Collecting cryptography>=1.3 (from pyOpenSSL->Quandl)
Using cached cryptography-1.4.tar.gz
Requirement already satisfied (use --upgrade to upgrade): pytz>=2011k in ./.local/lib/python3.5/site-packages (from pandas>=0.14->Quandl)
Requirement already satisfied (use --upgrade to upgrade): idna>=2.0 in /usr/lib/python3/dist-packages (from cryptography>=1.3->pyOpenSSL->Quandl)
Requirement already satisfied (use --upgrade to upgrade): setuptools>=11.3 in /usr/lib/python3/dist-packages (from cryptography>=1.3->pyOpenSSL->Quandl)
Collecting cffi>=1.4.1 (from cryptography>=1.3->pyOpenSSL->Quandl)
Using cached cffi-1.6.0.tar.gz
Requirement already satisfied (use --upgrade to upgrade): pycparser in /usr/local/lib/python3.5/dist-packages (from cffi>=1.4.1->cryptography>=1.3->pyOpenSSL->Quandl)
Installing collected packages: cffi, cryptography, pyOpenSSL, ndg-httpsclient, Quandl
Running setup.py install for cffi ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-6vc_mid4/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-4apk95_7-record/install-record.txt --single-version-externally-managed --compile:
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.5
creating build/lib.linux-x86_64-3.5/cffi
copying cffi/gc_weakref.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/recompiler.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/__init__.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/commontypes.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/api.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/verifier.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/model.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/cparser.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/lock.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.5/cffi
copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.5/cffi
copying cffi/_embedding.h -> build/lib.linux-x86_64-3.5/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-x86_64-3.5
creating build/temp.linux-x86_64-3.5/c
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DUSE__THREAD -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python3.5m -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.5/c/_cffi_backend.o
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-6vc_mid4/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-4apk95_7-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-6vc_mid4/cffi/
Install using easy_install works but only for python 2.7

pip install in Cygwin cannot find file error

I am on a Mac OS El Capitan, running a Windows 10 64-bit VM inside Parallels. I have Cygwin installed and Anaconda3. I would like to install two packages (pyrsistent and rpy2) using pip. Both of them throw an error "error: [WinError 2] The system cannot find the file specified" without specifying the file it can't find.
Here's the output:
$ pip install pyrsistent
Collecting pyrsistent
Using cached pyrsistent-0.11.9.tar.gz
Requirement already satisfied (use --upgrade to upgrade): six in c:\anaconda3\lib\site-packages (from pyrsistent)
Building wheels for collected packages: pyrsistent
Running setup.py bdist_wheel for pyrsistent
Complete output from command C:\Anaconda3\python.exe -c "import setuptools;__file__='C:\\cygwin64\\tmp\\pip-build-sqcinj9m\\pyrsistent\\setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d C:\cygwin64\tmp\tmpn25raothpip-wheel-:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.5
copying _pyrsistent_version.py -> build\lib.win-amd64-3.5
creating build\lib.win-amd64-3.5\pyrsistent
copying pyrsistent\_checked_types.py -> build\lib.win-amd64-3.5\pyrsistent
copying pyrsistent\_field_common.py -> build\lib.win-amd64-3.5\pyrsistent
copying pyrsistent\_helpers.py -> build\lib.win-amd64-3.5\pyrsistent
copying pyrsistent\_immutable.py -> build\lib.win-amd64-3.5\pyrsistent
copying pyrsistent\_pbag.py -> build\lib.win-amd64-3.5\pyrsistent
copying pyrsistent\_pclass.py -> build\lib.win-amd64-3.5\pyrsistent
copying pyrsistent\_pdeque.py -> build\lib.win-amd64-3.5\pyrsistent
copying pyrsistent\_plist.py -> build\lib.win-amd64-3.5\pyrsistent
copying pyrsistent\_pmap.py -> build\lib.win-amd64-3.5\pyrsistent
copying pyrsistent\_precord.py -> build\lib.win-amd64-3.5\pyrsistent
copying pyrsistent\_pset.py -> build\lib.win-amd64-3.5\pyrsistent
copying pyrsistent\_pvector.py -> build\lib.win-amd64-3.5\pyrsistent
copying pyrsistent\_transformations.py -> build\lib.win-amd64-3.5\pyrsistent
copying pyrsistent\__init__.py -> build\lib.win-amd64-3.5\pyrsistent
running build_ext
building 'pvectorc' extension
error: [WinError 2] The system cannot find the file specified
----------------------------------------
Failed building wheel for pyrsistent
Failed to build pyrsistent
Installing collected packages: pyrsistent
Running setup.py install for pyrsistent
Complete output from command C:\Anaconda3\python.exe -c "import setuptools, tokenize;__file__='C:\\cygwin64\\tmp\\pip-build-sqcinj9m\\pyrsistent\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\cygwin64\tmp\pip-_wbdiief-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
running build_ext
building 'pvectorc' extension
error: [WinError 2] The system cannot find the file specified
----------------------------------------
Command "C:\Anaconda3\python.exe -c "import setuptools, tokenize;__file__='C:\\cygwin64\\tmp\\pip-build-sqcinj9m\\pyrsistent\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\cygwin64\tmp\pip-_wbdiief-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\cygwin64\tmp\pip-build-sqcinj9m\pyrsistent
Both python3 and pip are in the path:
$ which pip
/cygdrive/c/Anaconda3/Scripts/pip
$ which python
/cygdrive/c/Anaconda3/python
The error is identical when trying to install rpy2 so it's not something particular to the package I'm trying to install. Does anyone have ideas of the problem or ideas for troubleshooting? I've tried debugging into the install.py but the code throwing the error is in C. I've tried doing the install in verbose mode, but it still doesn't say what file it cannot find in that case.
(and if you're wondering why I haven't used conda, it's because it doesn't install pyrsistent, and for the rpy2 install, it insists on linking it to its own install of R, and even when specifying my own install, something doesn't link correctly. I've already been down that road and would like to stick to pip).
Here is a workaround for anyone who is stuck installing python packages on Windows. There are several sites that have Windows binaries for python packages. I was able to find a binary for rpy2 here but there are several other sites too, if you just google something like "python Windows binaries". Then I did:
pip install rpy2-2.7.4-cp35-none-win_amd64.whl
pyrsistent was not in that website or any of several other binaries websites I found. But someone else on my dev team sent me the /pyrsistent directory inside his Anaconda3/Lib/site-packages directory and after copying it to the same directory on my machine, I was able to import pyrsistent as well.
It's not pretty, but it worked.

Resources