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
Related
when i run
pip install matplotlib
or
pip3 install matplotlib
I get this error which i really don't understand.
this has never happened before.
PS D:\Desktop\Reinforcement Learning> pip install matplotlib
Collecting matplotlib
Using cached matplotlib-3.5.2-cp310-cp310-win_amd64.whl (7.2 MB)
Requirement already satisfied: packaging>=20.0 in c:\users\ashis\appdata\local\programs\python\python31
0\lib\site-packages (from matplotlib) (21.3)
Requirement already satisfied: pyparsing>=2.2.1 in c:\users\ashis\appdata\local\programs\python\python3
10\lib\site-packages (from matplotlib) (3.0.9)
Requirement already satisfied: numpy>=1.17 in c:\users\ashis\appdata\local\programs\python\python310\li
b\site-packages (from matplotlib) (1.23.0)
Collecting cycler>=0.10
Using cached cycler-0.11.0-py3-none-any.whl (6.4 kB)
Collecting fonttools>=4.22.0
Using cached fonttools-4.34.4-py3-none-any.whl (944 kB)
Requirement already satisfied: python-dateutil>=2.7 in c:\users\ashis\appdata\local\programs\python\pyt
hon310\lib\site-packages (from matplotlib) (2.8.2)
Requirement already satisfied: pillow>=6.2.0 in c:\users\ashis\appdata\local\programs\python\python310\
lib\site-packages (from matplotlib) (9.2.0)
Collecting kiwisolver>=1.0.1
Using cached kiwisolver-1.4.3-cp310-cp310-win_amd64.whl (55 kB)
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'c:\\users\\a
shis\\appdata\\local\\programs\\python\\python310\\lib\\site-packages\\numpy-1.23.0.dist-info\\METADATA
'
Can anyone help me with this problem?
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'c:\\users\\a
shis\\appdata\\local\\programs\\python\\python310\\lib\\site-packages\\numpy-1.23.0.dist-info\\METADATA
'
Since python got updated to 3.9 this might because of version. try to upgrade your matplolib using
pip install --upgrade matplotlib
should work. if not try this as well
pip intstall pipwin
pipwin install <package name>
Hope this helps. If not please feel free to comment
I tested a python script to send anythink with Pushover. But I get the error "ImportError: No module named pushover"
My installed Versions:
# pip install python-pushover
Collecting python-pushover
Using cached https://files.pythonhosted.org/packages/6f/3d/144a0137c749bd152c3ab7f4d3ce8fe1455168dab36c2fcd900d3fab16ad/python-pushover-0.4.tar.gz
Requirement already satisfied: requests>=1.0 in /usr/local/lib/python3.5/dist-packages (from python-pushover) (2.21.0)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in /usr/local/lib/python3.5/dist-packages (from requests>=1.0->python-pushover) (1.24.1)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.5/dist-packages (from requests>=1.0->python-pushover) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.5/dist-packages (from requests>=1.0->python-pushover) (2018.11.29)
Requirement already satisfied: idna<2.9,>=2.5 in /usr/local/lib/python3.5/dist-packages (from requests>=1.0->python-pushover) (2.8)
Installing collected packages: python-pushover
Running setup.py install for python-pushover ... done
Successfully installed python-pushover-0.4
# python -V
Python 2.7.13
# python3 -V
Python 3.5.3
The scriptheader:
#!/usr/bin/env python
import pushover
I have tried with pip(3) to install python-pushover but with no success.
I faced this exact error today. This is due to co-existing of different versions of python in your system.
Do, /usr/bin/python3 if the module was installed for py3 and just /usr/bin/python for py2 before running the script.
Refer Installed module using pip, not found for more.
In my case, you should :
uninstall that package:
pip uninstall pushover
and install the correct package:
pip install python-pushover
And your code will work fine.
I am attempting to run the source code associated with the article at https://pawelmhm.github.io/python/websockets/2016/01/02/playing-with-websockets.html, but cannot get Twisted to work. I am using macOS High Sierra 10.13.5 and Python 3.6.4 (in a virtual environment).
To create the virtual environment I used:
python3 -m venv venv
. venv/bin/activate
where python3 is my system installed python 3.6.4:
$ which python3
/Library/Frameworks/Python.framework/Versions/3.6/bin/python3
I tried installing twisted using pip:
$ pip install twisted
Collecting twisted
Downloading https://files.pythonhosted.org/packages/12/2a/e9e4fb2e6b2f7a75577e0614926819a472934b0b85f205ba5d5d2add54d0/Twisted-18.4.0.tar.bz2 (3.0MB)
100% |████████████████████████████████| 3.0MB 1.9MB/s
Collecting zope.interface>=4.4.2 (from twisted)
Downloading https://files.pythonhosted.org/packages/ac/8a/657532df378c2cd2a1fe6b12be3b4097521570769d4852ec02c24bd3594e/zope.interface-4.5.0.tar.gz (151kB)
100% |████████████████████████████████| 153kB 281kB/s
Collecting constantly>=15.1 (from twisted)
Downloading https://files.pythonhosted.org/packages/b9/65/48c1909d0c0aeae6c10213340ce682db01b48ea900a7d9fce7a7910ff318/constantly-15.1.0-py2.py3-none-any.whl
Collecting incremental>=16.10.1 (from twisted)
Downloading https://files.pythonhosted.org/packages/f5/1d/c98a587dc06e107115cf4a58b49de20b19222c83d75335a192052af4c4b7/incremental-17.5.0-py2.py3-none-any.whl
Collecting Automat>=0.3.0 (from twisted)
Downloading https://files.pythonhosted.org/packages/a3/86/14c16bb98a5a3542ed8fed5d74fb064a902de3bdd98d6584b34553353c45/Automat-0.7.0-py2.py3-none-any.whl
Collecting hyperlink>=17.1.1 (from twisted)
Downloading https://files.pythonhosted.org/packages/a7/b6/84d0c863ff81e8e7de87cff3bd8fd8f1054c227ce09af1b679a8b17a9274/hyperlink-18.0.0-py2.py3-none-any.whl
Requirement already satisfied: setuptools in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from zope.interface>=4.4.2->twisted) (28.8.0)
Collecting attrs>=16.1.0 (from Automat>=0.3.0->twisted)
Downloading https://files.pythonhosted.org/packages/41/59/cedf87e91ed541be7957c501a92102f9cc6363c623a7666d69d51c78ac5b/attrs-18.1.0-py2.py3-none-any.whl
Requirement already satisfied: six in /Users/sumit/Library/Python/3.6/lib/python/site-packages (from Automat>=0.3.0->twisted) (1.11.0)
Collecting idna>=2.5 (from hyperlink>=17.1.1->twisted)
Downloading https://files.pythonhosted.org/packages/4b/2a/0276479a4b3caeb8a8c1af2f8e4355746a97fab05a372e4a2c6a6b876165/idna-2.7-py2.py3-none-any.whl (58kB)
100% |████████████████████████████████| 61kB 2.8MB/s
Installing collected packages: zope.interface, constantly, incremental, attrs, Automat, idna, hyperlink, twisted
Running setup.py install for zope.interface ... done
Running setup.py install for twisted ... done
Successfully installed Automat-0.7.0 attrs-18.1.0 constantly-15.1.0 hyperlink-18.0.0 idna-2.7 incremental-17.5.0 twisted-18.4.0 zope.interface-4.5.0
But I keep getting the error:
$ python server.py
Traceback (most recent call last):
File "server.py", line 4, in <module>
from twisted.web.static import File
ModuleNotFoundError: No module named 'twisted'
Search on the web resulted in no useful resolution and attempts to use either easy_install or brew did not work too. Any suggestions are appreciated.
Thank you #9769953, that resolved the issue!
If anyone else searches for this issue (and for my future reference!), use:
python -m pip install twisted
I did have a virtual environment but apparently the python and pip combination was messing this up. Using python -m pip resolved the dependency issue.
when i run
pip install twisted
in the command line in windows, it starts installing packages until the flowing line comes up.
failed building wheel for twisted
pip then crashed soon after, saying it has failed the installation.
why is this ?
is there a way round it to install twisted?
my wheel version is 0.29, windows 10. twisted installs fine on python 2.7
thanks
I meet similar problem like yours.You can try to install the Twisted whit wheels
but at first,you should install the wheels
pip install wheels
then,download an appropriate version from this
website:http://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted
you can get xxxx.whl file
use
pip install xxxx/xxxxxx.whl
Finished!
Basically, that is not a programming question (I feel it might as well fit well into https://superuser.com/ or https://serverfault.com/).
Could you please provide a tad more information?
What OS are you running? What version?
For comparison, I'm running Debian GNU/Linux (testing), and
pip3 install twisted
performs fine:
collecting twisted
Using cached Twisted-17.1.0.tar.bz2
Collecting zope.interface>=4.0.2 (from twisted)
Using cached zope.interface-4.3.3.tar.gz
Collecting constantly>=15.1 (from twisted)
Downloading constantly-15.1.0-py2.py3-none-any.whl
Collecting incremental>=16.10.1 (from twisted)
Downloading incremental-16.10.1-py2.py3-none-any.whl
Collecting Automat>=0.3.0 (from twisted)
Using cached Automat-0.5.0-py2.py3-none-any.whl
Requirement already satisfied: setuptools in /usr/local/lib/python3.5/dist-packages (from zope.interface>=4.0.2->twisted)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from Automat>=0.3.0->twisted)
Collecting attrs (from Automat>=0.3.0->twisted)
Using cached attrs-16.3.0-py2.py3-none-any.whl
Requirement already satisfied: packaging>=16.8 in /usr/local/lib/python3.5/dist-packages (from setuptools->zope.interface>=4.0.2->twisted)
Requirement already satisfied: appdirs>=1.4.0 in /usr/local/lib/python3.5/dist-packages (from setuptools->zope.interface>=4.0.2->twisted)
Requirement already satisfied: pyparsing in /usr/local/lib/python3.5/dist-packages (from packaging>=16.8->setuptools->zope.interface>=4.0.2->twisted)
Building wheels for collected packages: twisted, zope.interface
Running setup.py bdist_wheel for twisted ... done
Stored in directory: /root/.cache/pip/wheels/65/e3/44/cd3da92c03926aabc80e658e11d6e64619abce3ef44c1c34df
Running setup.py bdist_wheel for zope.interface ... done
Stored in directory: /root/.cache/pip/wheels/00/aa/8b/f1d1eb398423e59894b45ee151344e243808156c2d182c9f4e
Successfully built twisted zope.interface
Installing collected packages: zope.interface, constantly, incremental, attrs, Automat, twisted
Successfully installed Automat-0.5.0 attrs-16.3.0 constantly-15.1.0 incremental-16.10.1 twisted-17.1.0 zope.interface-4.3.3
I must admit, this install was done outside of virtualenv.
Did you try installing twisted outside your virtualenv?
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.