I am trying to use DeepAR for forecasting time series. I install gluonts, but when i import the module i get the error with absence mxnet.
Use python version 3.9.7, numpy version 1.20.3
As I understand it, the error is related to the version? mxnet install only with numpy 1.16.6?
Error wit install mxnet:
Collecting mxnet
Using cached mxnet-1.7.0.post2-py2.py3-none-win_amd64.whl (33.1 MB)
Collecting graphviz<0.9.0,>=0.8.1
Using cached graphviz-0.8.4-py2.py3-none-any.whl (16 kB)
Requirement already satisfied: requests<2.19.0,>=2.18.4 in c:\users\tred1\anaconda3\lib\site-packages (from mxnet) (2.18.4)
Collecting numpy<1.17.0,>=1.8.2
Using cached numpy-1.16.6.zip (5.1 MB)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\tred1\anaconda3\lib\site-packages (from requests<2.19.0,>=2.18.4->mxnet) (2021.10.8)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in c:\users\tred1\anaconda3\lib\site-packages (from requests<2.19.0,>=2.18.4->mxnet) (1.22)
Requirement already satisfied: idna<2.7,>=2.5 in c:\users\tred1\anaconda3\lib\site-packages (from requests<2.19.0,>=2.18.4->mxnet) (2.6)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\users\tred1\anaconda3\lib\site-packages (from requests<2.19.0,>=2.18.4->mxnet) (3.0.4)
Building wheels for collected packages: numpy
Building wheel for numpy (setup.py): started
Building wheel for numpy (setup.py): finished with status 'error'
Running setup.py clean for numpy
Failed to build numpy
Installing collected packages: numpy, graphviz, mxnet
Attempting uninstall: numpy
Found existing installation: numpy 1.20.3
Uninstalling numpy-1.20.3:
Successfully uninstalled numpy-1.20.3
Running setup.py install for numpy: started
Running setup.py install for numpy: finished with status 'error'
Rolling back uninstall of numpy
Moving to c:\users\tred1\anaconda3\lib\site-packages\numpy-1.20.3.dist-info\
from C:\Users\tred1\anaconda3\Lib\site-packages\~umpy-1.20.3.dist-info
Moving to c:\users\tred1\anaconda3\lib\site-packages\numpy\
from C:\Users\tred1\anaconda3\Lib\site-packages\~umpy
Moving to c:\users\tred1\anaconda3\scripts\f2py-script.py
from C:\Users\tred1\AppData\Local\Temp\pip-uninstall-5bceooxs\f2py-script.py
Moving to c:\users\tred1\anaconda3\scripts\f2py.exe
from C:\Users\tred1\AppData\Local\Temp\pip-uninstall-5bceooxs\f2py.exe
Note: you may need to restart the kernel to use updated packages
Related
In base environment I have already installed fastquant package
but after creating and activating new conda environment I am not able to install the fastquant package.
I already have pandas 1.5.2
but when I install fastquant it is trying to install pandas 1.1.5 as it is a dependency
Collecting fastquant
Using cached fastquant-0.1.8.0-py3-none-any.whl (5.9 MB)
Collecting oauthlib>=3.1.0
Using cached oauthlib-3.2.2-py3-none-any.whl (151 kB)
Collecting chardet>=3.0.4
Using cached chardet-5.1.0-py3-none-any.whl (199 kB)
Requirement already satisfied: tqdm>=4.28.1 in c:\users\11832\anaconda3\envs\fbprophetenv\lib\site-packages (from fastquant) (4.64.1)
Requirement already satisfied: six>=1.13.0 in c:\users\11832\anaconda3\envs\fbprophetenv\lib\site-packages (from fastquant) (1.16.0)
Collecting tweepy>=3.8.0
Using cached tweepy-4.12.1-py3-none-any.whl (101 kB)
Requirement already satisfied: soupsieve>=1.9.5 in c:\users\11832\anaconda3\envs\fbprophetenv\lib\site-packages (from fastquant) (2.3.2.post1)
Collecting black>=19.10b0
Using cached black-23.1a1-cp310-cp310-win_amd64.whl (1.2 MB)
Collecting nltk>=3.5
Using cached nltk-3.8-py3-none-any.whl (1.5 MB)
Requirement already satisfied: urllib3>=1.25.7 in c:\users\11832\anaconda3\envs\fbprophetenv\lib\site-packages (from fastquant) (1.26.13)
Requirement already satisfied: certifi>=2019.11.28 in c:\users\11832\anaconda3\envs\fbprophetenv\lib\site-packages (from fastquant) (2022.12.7)
Collecting pandas==1.1.5
Using cached pandas-1.1.5.tar.gz (5.2 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... \
but is it failing after this with following error:
creating build\lib.win-amd64-cpython-310\pandas\_libs\tslibs
copying pandas\_libs\tslibs\__init__.py -> build\lib.win-amd64-cpython-310\pandas\_libs\tslibs
creating build\lib.win-amd64-cpython-310\pandas\_libs\window
copying pandas\_libs\window\__init__.py -> build\lib.win-amd64-cpython-310\pandas\_libs\window
creating build\lib.win-amd64-cpython-310\pandas\io\formats\templates
copying pandas\io\formats\templates\html.tpl -> build\lib.win-amd64-cpython-310\pandas\io\formats\templates
UPDATING build\lib.win-amd64-cpython-310\pandas/_version.py
set build\lib.win-amd64-cpython-310\pandas/_version.py to '1.1.5'
running build_ext
building 'pandas._libs.algos' 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/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pandas
Failed to build pandas
ERROR: Could not build wheels for pandas, which is required to install pyproject.toml-based projects
The PyPI package has the version of pandas pinned to 1.1.5, it is probably a mistake. The current version of python/requirements.txt in the github repo has it as pandas >= 1.1.5.
You can raise an issue on the github repo to report it. In the mean time, you can install Pandas 1.1.5 using conda before you install fastquant.
conda install pandas==1.1.5
I have Cygwin installed on my PC and I am trying to install pandas via the pip installer.
Below are some of the messages I get when installing pandas.
$ pip install pandas
Collecting pandas
Using cached https://files.pythonhosted.org/packages/07/cf/1b6917426a9a16fd79d56385d0d907f344188558337d6b81196792f857e9/pandas-0.25.1.tar.gz
Requirement already satisfied: python-dateutil>=2.6.1 in /usr/lib/python3.7/site-packages (from pandas) (2.8.0)
Requirement already satisfied: pytz>=2017.2 in /usr/lib/python3.7/site-packages (from pandas) (2019.2)
Requirement already satisfied: numpy>=1.13.3 in /usr/lib/python3.7/site-packages (from pandas) (1.16.2)
Requirement already satisfied: six>=1.5 in /usr/lib/python3.7/site-packages (from python-dateutil>=2.6.1->pandas) (1.12.0)
Building wheels for collected packages: pandas
Building wheel for pandas (setup.py): started
Building wheel for pandas (setup.py): finished with status 'error'
Running setup.py clean for pandas
Failed to build pandas
Installing collected packages: pandas
Running setup.py install for pandas: started
If anyone can suggest what I should do to get around this error, it would be greatly appreciated.
I am trying to install the "MLBox" python package on anaconda (Python 3.6).
This package needs "xgboost" so I download the wheel file from this link and I did a pip install wheel-file. I had no issue with it. But when I use the pip install for installing "mlbox" I have this error:
Collecting pandas==0.20.3 (from mlbox)
Using cached pandas-0.20.3-cp36-cp36m-win_amd64.whl
Requirement already satisfied: joblib==0.11 in c:\users\amira ayadi\anaconda3\lib\site-packages (from mlbox)
Collecting scikit-learn==0.19.0 (from mlbox)
Using cached scikit_learn-0.19.0-cp36-cp36m-win_amd64.whl
Requirement already satisfied: Theano==0.9.0 in c:\users\amira ayadi\anaconda3\lib\site-packages (from mlbox)
Collecting xgboost==0.6a2 (from mlbox)
Using cached xgboost-0.6a2.tar.gz
No files/directories in C:\Users\AMIRAA~1\AppData\Local\Temp\pip-build-6ytmh20a\xgboost\pip-egg-info (from PKG-INFO)
I also tired to install xgboost with anaconda solution (https://anaconda.org/anaconda/py-xgboost)
But same error.
Do you have some ideas?
I am on Windows 10
How do I upgrade the tensoflow library on my windows machine? Tensorflow is installed currently and runs fine. I am using anaconda distribution.
import tensorflow as tf
tf.VERSION
Out[37]: '1.2.1'
My python version is below
>python -V
Python 3.5.3 :: Anaconda custom (64-bit)
---------------update 1 ------------------------------------------
Tried first answer and got below message
>pip install tensorflow --upgrade
Collecting tensorflow
Downloading tensorflow-1.3.0-cp35-cp35m-win_amd64.whl (25.5MB)
100% |################################| 25.5MB 47kB/s
Collecting protobuf>=3.3.0 (from tensorflow)
Downloading protobuf-3.4.0-py2.py3-none-any.whl (375kB)
100% |################################| 378kB 1.4MB/s
Requirement already up-to-date: numpy>=1.11.0 in c:\users\johndoe\appdata\local\conda\conda\envs\tensorflowspyder\lib\site-packages (from tensorflow)
Collecting tensorflow-tensorboard<0.2.0,>=0.1.0 (from tensorflow)
Downloading tensorflow_tensorboard-0.1.8-py3-none-any.whl (1.6MB)
100% |################################| 1.6MB 591kB/s
Requirement already up-to-date: six>=1.10.0 in c:\users\johndoe\appdata\local\conda\conda\envs\tensorflowspyder\lib\site-packages (from tensorflow)
Collecting wheel>=0.26 (from tensorflow)
Downloading wheel-0.30.0-py2.py3-none-any.whl (49kB)
100% |################################| 51kB 1.2MB/s
Collecting setuptools (from protobuf>=3.3.0->tensorflow)
Downloading setuptools-36.6.0-py2.py3-none-any.whl (481kB)
100% |################################| 481kB 1.1MB/s
Requirement already up-to-date: werkzeug>=0.11.10 in c:\users\johndoe\appdata\local\conda\conda\envs\tensorflowspyder\lib\site-packages (from tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow)
Requirement already up-to-date: bleach==1.5.0 in c:\users\johndoe\appdata\local\conda\conda\envs\tensorflowspyder\lib\site-packages (from tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow)
Collecting markdown>=2.6.8 (from tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow)
Downloading Markdown-2.6.9.tar.gz (271kB)
100% |################################| 276kB 1.5MB/s
Requirement already up-to-date: html5lib==0.9999999 in c:\users\johndoe\appdata\local\conda\conda\envs\tensorflowspyder\lib\site-packages (from tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow)
Building wheels for collected packages: markdown
Running setup.py bdist_wheel for markdown ... done
Stored in directory: C:\Users\johndoe\AppData\Local\pip\Cache\wheels\bf\46\10\c93e17ae86ae3b3a919c7b39dad3b5ccf09aeb066419e5c1e5
Successfully built markdown
Installing collected packages: setuptools, protobuf, markdown, wheel, tensorflow-tensorboard, tensorflow
Found existing installation: setuptools 36.2.0
Uninstalling setuptools-36.2.0:
Successfully uninstalled setuptools-36.2.0
Rolling back uninstall of setuptools
Exception:
Traceback (most recent call last):
File "C:\Users\johndoe\AppData\Local\conda\conda\envs\tensorflowspyder\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "C:\Users\johndoe\AppData\Local\conda\conda\envs\tensorflowspyder\lib\site-packages\pip\commands\install.py", line 342, in run
prefix=options.prefix_path,
File "C:\Users\johndoe\AppData\Local\conda\conda\envs\tensorflowspyder\lib\site-packages\pip\req\req_set.py", line 784, in install
**kwargs
File "C:\Users\johndoe\AppData\Local\conda\conda\envs\tensorflowspyder\lib\site-packages\pip\req\req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "C:\Users\johndoe\AppData\Local\conda\conda\envs\tensorflowspyder\lib\site-packages\pip\req\req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "C:\Users\johndoe\AppData\Local\conda\conda\envs\tensorflowspyder\lib\site-packages\pip\wheel.py", line 247, in move_wheel_files
prefix=prefix,
File "C:\Users\johndoe\AppData\Local\conda\conda\envs\tensorflowspyder\lib\site-packages\pip\locations.py", line 140, in distutils_scheme
d = Distribution(dist_args)
File "C:\Users\johndoe\AppData\Local\conda\conda\envs\tensorflowspyder\lib\site-packages\setuptools\dist.py", line 365, in __init__
self._finalize_requires()
File "C:\Users\johndoe\AppData\Local\conda\conda\envs\tensorflowspyder\lib\site-packages\setuptools\dist.py", line 372, in _finalize_requires
if not self.install_requires:
AttributeError: 'Distribution' object has no attribute 'install_requires'
my version is still the same
----------------update2----------------------------------
I ran the same command again and got below message
>pip install tensorflow --upgrade
Collecting tensorflow
Using cached tensorflow-1.3.0-cp35-cp35m-win_amd64.whl
Collecting tensorflow-tensorboard<0.2.0,>=0.1.0 (from tensorflow)
Using cached tensorflow_tensorboard-0.1.8-py3-none-any.whl
Requirement already up-to-date: numpy>=1.11.0 in c:\users\johndoe\appdata\local\conda\conda\envs\tensorflowspyder\lib\site-packages (from tensorflow)
Collecting protobuf>=3.3.0 (from tensorflow)
Using cached protobuf-3.4.0-py2.py3-none-any.whl
Requirement already up-to-date: six>=1.10.0 in c:\users\johndoe\appdata\local\conda\conda\envs\tensorflowspyder\lib\site-packages (from tensorflow)
Collecting wheel>=0.26 (from tensorflow)
Using cached wheel-0.30.0-py2.py3-none-any.whl
Requirement already up-to-date: html5lib==0.9999999 in c:\users\johndoe\appdata\local\conda\conda\envs\tensorflowspyder\lib\site-packages (from tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow)
Collecting markdown>=2.6.8 (from tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow)
Requirement already up-to-date: bleach==1.5.0 in c:\users\johndoe\appdata\local\conda\conda\envs\tensorflowspyder\lib\site-packages (from tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow)
Requirement already up-to-date: werkzeug>=0.11.10 in c:\users\johndoe\appdata\local\conda\conda\envs\tensorflowspyder\lib\site-packages (from tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow)
Collecting setuptools (from protobuf>=3.3.0->tensorflow)
Using cached setuptools-36.6.0-py2.py3-none-any.whl
Installing collected packages: setuptools, protobuf, markdown, wheel, tensorflow-tensorboard, tensorflow
Found existing installation: setuptools 36.2.0
Uninstalling setuptools-36.2.0:
Successfully uninstalled setuptools-36.2.0
Found existing installation: protobuf 3.3.0
Uninstalling protobuf-3.3.0:
Successfully uninstalled protobuf-3.3.0
Found existing installation: Markdown 2.6.8
Uninstalling Markdown-2.6.8:
Successfully uninstalled Markdown-2.6.8
Found existing installation: wheel 0.29.0
Uninstalling wheel-0.29.0:
Successfully uninstalled wheel-0.29.0
Found existing installation: tensorflow 1.2.1
Uninstalling tensorflow-1.2.1:
Successfully uninstalled tensorflow-1.2.1
Successfully installed markdown-2.6.9 protobuf-3.4.0 setuptools-36.6.0 tensorflow-1.3.0 tensorflow-tensorboard-0.1.8 wheel-0.30.0
i checked and it seems that tensorflow version was upgraded
tf.VERSION
Out[2]: '1.3.0'
Upgrade it like a normal package:
If tensorflow is installed in a conda environment
activate your-conda-environment
then:
pip install pip --upgrade
pip install tensorflow --upgrade
This just worked for me.
I am not allowed to post comments, so I write this as an answer.
The following worked for me:
pip install --user tensorflow --upgrade
Without "user" I got the error below, even when I run the prompt as Administrator:
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied:
Consider using the `--user` option or check the permissions.
Pip doesn't seem to build dependencies from source on my Ubuntu server, while it always does that on my OS X machine. For example, when I try to install package qiime in a conda or virtualenv (I tried both) environment it takes seconds to install a hell lot of things that take loads of time to compile on my Mac.
(qiime)user#server:~$ pip install qiime
Collecting qiime
Collecting qiime-default-reference<0.2.0,>=0.1.2 (from qiime)
Collecting burrito<1.0.0,>=0.9.1 (from qiime)
Collecting pandas>=0.13.1 (from qiime)
Collecting natsort<4.0.0 (from qiime)
Using cached natsort-3.5.6-py2.py3-none-any.whl
Collecting matplotlib!=1.4.2,>=1.1.0 (from qiime)
Collecting numpy>=1.9.0 (from qiime)
Collecting gdata (from qiime)
Collecting scikit-bio<0.3.0,>=0.2.3 (from qiime)
Collecting pynast==1.2.2 (from qiime)
Collecting biom-format<2.2.0,>=2.1.4 (from qiime)
Collecting burrito-fillings<0.2.0,>=0.1.1 (from qiime)
Collecting qcli<0.2.0,>=0.1.1 (from qiime)
Collecting scipy>=0.14.0 (from qiime)
Collecting cogent==1.5.3 (from qiime)
Collecting emperor<1.0.0,>=0.9.51 (from qiime)
Collecting six (from qiime-default-reference<0.2.0,>=0.1.2->qiime)
Using cached six-1.10.0-py2.py3-none-any.whl
Collecting future (from burrito<1.0.0,>=0.9.1->qiime)
Collecting pytz>=2011k (from pandas>=0.13.1->qiime)
Using cached pytz-2015.7-py2.py3-none-any.whl
Collecting python-dateutil (from pandas>=0.13.1->qiime)
Using cached python_dateutil-2.4.2-py2.py3-none-any.whl
Collecting cycler (from matplotlib!=1.4.2,>=1.1.0->qiime)
Using cached cycler-0.9.0-py2.py3-none-any.whl
Collecting pyparsing!=2.0.0,!=2.0.4,>=1.5.6 (from matplotlib!=1.4.2,>=1.1.0->qiime)
Using cached pyparsing-2.0.6-py2.py3-none-any.whl
Collecting IPython (from scikit-bio<0.3.0,>=0.2.3->qiime)
Using cached ipython-4.0.0-py2-none-any.whl
Collecting click (from biom-format<2.2.0,>=2.1.4->qiime)
Using cached click-5.1-py2.py3-none-any.whl
Collecting pyqi (from biom-format<2.2.0,>=2.1.4->qiime)
Collecting decorator (from IPython->scikit-bio<0.3.0,>=0.2.3->qiime)
Using cached decorator-4.0.4-py2.py3-none-any.whl
Collecting simplegeneric>0.8 (from IPython->scikit-bio<0.3.0,>=0.2.3->qiime)
Collecting pexpect (from IPython->scikit-bio<0.3.0,>=0.2.3->qiime)
Collecting traitlets (from IPython->scikit-bio<0.3.0,>=0.2.3->qiime)
Using cached traitlets-4.0.0-py2.py3-none-any.whl
Collecting pickleshare (from IPython->scikit-bio<0.3.0,>=0.2.3->qiime)
Collecting ptyprocess>=0.5 (from pexpect->IPython->scikit-bio<0.3.0,>=0.2.3->qiime)
Collecting ipython-genutils (from traitlets->IPython->scikit-bio<0.3.0,>=0.2.3->qiime)
Using cached ipython_genutils-0.1.0-py2.py3-none-any.whl
Collecting path.py (from pickleshare->IPython->scikit-bio<0.3.0,>=0.2.3->qiime)
Using cached path.py-8.1.2-py2.py3-none-any.whl
Installing collected packages: six, qiime-default-reference, future, burrito, pytz, python-dateutil, numpy, pandas, natsort, cycler, pyparsing, matplotlib, gdata, scipy, decorator, simplegeneric, ptyprocess, pexpect, ipython-genutils, traitlets, path.py, pickleshare, IPython, scikit-bio, cogent, pynast, click, pyqi, biom-format, burrito-fillings, qcli, emperor, qiime
Successfully installed IPython-4.0.0 biom-format-2.1.5 burrito-0.9.1 burrito-fillings-0.1.1 click-5.1 cogent-1.5.3 cycler-0.9.0 decorator-4.0.4 emperor-0.9.51 future-0.15.2 gdata-2.0.18 ipython-genutils-0.1.0 matplotlib-1.5.0 natsort-3.5.6 numpy-1.10.1 pandas-0.17.0 path.py-8.1.2 pexpect-4.0.1 pickleshare-0.5 ptyprocess-0.5 pynast-1.2.2 pyparsing-2.0.6 pyqi-0.3.2 python-dateutil-2.4.2 pytz-2015.7 qcli-0.1.1 qiime-1.9.1 qiime-default-reference-0.1.3 scikit-bio-0.2.3 scipy-0.16.1 simplegeneric-0.8.1 six-1.10.0 traitlets-4.0.0
When I try to use the package I get various errors that prove that pip hasn't really compiled any dependencies. What should I do with that? For example, let's try to import pandas
In [1]: import pandas
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-d6ac987968b6> in <module>()
----> 1 import pandas
/home/user/.conda/envs/qiime/lib/python2.7/site-packages/pandas/__init__.py in <module>()
11 "pandas from the source directory, you may need to run "
12 "'python setup.py build_ext --inplace' to build the C "
---> 13 "extensions first.".format(module))
14
15 from datetime import datetime
ImportError: C extension: /home/user/.conda/envs/qiime/lib/python2.7/site-packages/pandas/hashtable.so: undefined symbol: PyFPE_jbuf not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext --inplace' to build the C extensions first.
I know I can build everything manually, but I really want to fix pip.
Passing --no-cache-dir to pip during installation seems to solve the issue, though I don't understand what caches have to do with compilation.