How to install pyfft on python3x? - pip

I tried installing pyfft using python -m pip install pyfft and I get
Downloading/unpacking pyfft
Downloading pyfft-0.3.8.tar.gz
Running setup.py (path:/tmp/pip_build_echeverl/pyfft/setup.py) egg_info for package pyfft
Python >=2.5 is required to use this module.
Complete output from command python setup.py egg_info:
Python >=2.5 is required to use this module.
----------------------------------------
Cleaning up...
I'm using Python 3.4.1

From the pyfft PyPI page:
THIS MODULE IS DEPRECATED. Its functionality has been moved to Reikna. The last version, 0.3.8, will remain on PyPi for backward compatibility purposes.
Reikna supports both Python 2 and Python 3. I suggest you install it instead.

Related

pip install can't find the latest version advertised by pip search

Trying to install the latest version of pandas on my ubuntu 16.04 through pip install
If I read well the result of this command:
python3 -m pip search pandas
...
pandas (0.25.3) - Powerful data structures for data analysis, time series, and statistics
INSTALLED: 0.24.2
LATEST: 0.25.3
...
I should be able to install version 0.25.3 of that package.
I tried
pip install --upgrade pandas --user, which tells me that I already have the latest version
pip install --upgrade --upgrade-strategy eager pandas --user, that installed up-to-date versions of dependencies, but pandas is still 0.24.2
python3 -m pip install pandas==0.25.3 --user which tells me that specific version can't be found, and provides me with a very long list of available versions stopping indeed at version 0.24.2
Am I misinterpreting something ?
Thanks for your help
If you're using the latest Python 3 available by default with Ubuntu 16.04 (3.5.1), it isn't compatible with the 0.25.x release of pandas according to the release notes. You can see some related discussion here.
To see this from pip, you can run the install command using -v and pip will indicate that some links are being ignored because of an incompatible Python version.
You have a few options:
Use a PPA that provides more recent Python 3 versions for 16.04, like deadsnakes
Use pyenv

Pytorch installation issue under Anaconda

I followed the link here to install fastai library using pip install git+https://github.com/fastai/fastai.git
It gave me the following error message. These messages keep the same even I installed Pytorch successfully using conda install pytorch-cpu -c pytorch
and pip3 install torchvision. What can be the reason?
Collecting torch<0.4 (from fastai==0.7.0)
Using cached https://files.pythonhosted.org/packages/5f/e9/bac4204fe9cb1a002ec6140b47f51affda1655379fe302a1caef421f9846/torch-0.1.2.post1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\shuxi\AppData\Local\Temp\pip-install-7sjptuad\torch\setup.py", line 11, in <module>
raise RuntimeError(README)
RuntimeError: PyTorch does not currently provide packages for PyPI (see status at https://github.com/pytorch/pytorch/issues/566).
Please follow the instructions at http://pytorch.org/ to install with miniconda instead.
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\shuxi\AppData\Local\Temp\pip-install-7sjptuad\torch\
To fix this, do:
$ pip install --upgrade git+https://github.com/fastai/fastai.git
OR
$ pip install --no-cache-dir git+https://github.com/fastai/fastai.git
Your command probably failed because you have installed a old version of torch (0.1.2) some time ago. pip was not supported for torch install for that version and pip instead redirected the user to open pytorch.org in the browser. In your case, pip is reusing this cached package. --upgrade forces pip to choose latest version of all depending packages.

Import Error : C Extension while generating windows executable of a Python script using PyInstaller

Import error: C extension: NO MODULE NAMED TIMEDELTAS 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 tried following things up to now but couldn't resolve this :
pip install --upgrade pip
pip install --upgrade pandas
uninstalled the existing version of pandas and installed again.
pip install Cython
Please look at the SCREENSHOT ATTACHED ABOVE SHOWS VERSION of PANDAS, NUMPY, PYTZ, SIX installed on my system.
NOTE : I'm using Python 2.7
Any help on this will be appreciated.
Thanks.

Python can't find or install lxml

In Win7, in python 3.4, in pandas, I tried to run pd.read_html.
It aborted, saying it couldn't find lxml.
I added "import lxml", and it said there was no module by that name.
I ran "pip install pandas lxml", and it aborted, saying
C:\Python34\hsf\pandas>pip install pandas lxml
Requirement already satisfied (use --upgrade to upgrade): pandas in c:\python34\
lib\site-packages
Downloading/unpacking lxml
Running setup.py (path:C:\Users\Windows\AppData\Local\Temp\pip_build_Windows\l
xml\setup.py) egg_info for package lxml
Building lxml version 3.4.4.
Building without Cython.
ERROR: b"'xslt-config' is not recognized as an internal or external command,
\r\noperable program or batch file.\r\n"
** make sure the development packages of libxml2 and libxslt are installed *
*
I tried pip to install libxml2, and libxslt, and that aborted saying:
C:\Python34\lib\distutils\dist.py:260: UserWarning: Unknown distribution option:
'bugtrack_url'
warnings.warn(msg)
error: Unable to find vcvarsall.bat
Prior SO answers to similar questions said "use sudo..." so were inapplicable to windows.
How can I install lxml in python 3.4 on Win7 ?
You can try the following:
pip install lxml
For the vcvarvasall.bat you can try installing: https://www.microsoft.com/en-us/download/details.aspx?id=44266
If none of those work you can download the precompiled binary here:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml
The last option is the easiest. Here are the steps:
1) Download the wheel at http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml
2) pip install wheel
3)pip install "path to where you downloaded the *.whl from step 1"

pip install ipython using python2.6 instead of python2.7 -- how to override? CentOS 6.5

I'm attempting to install ipython on a CentOS 6.5 box using pip, but I get an error because it is attempting to use python 2.6 instead of 2.7.
By default, I'm running python 2.6
$ python -V
Python 2.6.6
Which is located in /usr/bin/python
$ which python
/usr/bin/python
I've also installed python 2.7 and it is located in usr/local/bin/
$ which python2.7
/usr/local/bin/python2.7
I would like to install the latest version of ipython, and I'm using pip to do this.
$ sudo pip install ipython
Downloading/unpacking ipython
Downloading ipython-2.2.0.tar.gz (11.9MB): 11.9MB downloaded
Running setup.py (path:/tmp/pip_build_root/ipython/setup.py) egg_info for package ipython
ERROR: IPython requires Python version 2.7 or 3.3 or above.
Complete output from command python setup.py egg_info:
ERROR: IPython requires Python version 2.7 or 3.3 or above.
I can see that the setup.py script for ipython is determining the active version here:
v = sys.version_info
if v[:2] < (2,7) or (v[0] >= 3 and v[:2] < (3,3)):
error = "ERROR: IPython requires Python version 2.7 or 3.3 or above."
print(error, file=sys.stderr)
sys.exit(1)
PY3 = (sys.version_info[0] >= 3)
How can I override the version that pip is assessing by default? Should I make a symbolic link to the python 2.7 in /usr/local/bin? Simply updating my bash profile with an alias for python at /usr/local/bin/python2.7 does not do the trick. Thanks.
If you're using virtualenv, you can use the -p switch when creating the environment and it will understand you want that version of python:
virtualenv -p /usr/local/bin/python2.7 ~/.virtualenvs/venv
Will create a virtualenv venv under ~/.virtuenvs with /usr/local/bin/python2.7 copied to ~/.virtualenvs/venv/bin/python for the python interpreter. The line on top of all scripts is similarly going to be #~/.virtualenvs/venv/bin/python . If you still have problems, do leave a comment.

Resources