I have an EC2 Ubuntu 18.04.3 LTS instance with python 3.6.9
I tried to install pyarrow with this command:
python3 -m pip install pyarrow
But I get an error:
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;
__file__='/tmp/pip-build-3q5nmx81/pyarrow/setup.py';
f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');
f.close();exec(compile(code, __file__, 'exec'))"
install --record /tmp/pip-fgafmfzg-record/install-record.txt
--single-version-externally-managed --compile --user --prefix="
failed with error code 1 in /tmp/pip-build-3q5nmx81/pyarrow/
Reading the first messages after trying to install yarrow I see this:
Building wheels for collected packages: pyarrow
Running setup.py bdist_wheel for pyarrow ... error
Please, do you know how I can solve this issue? Thank you in advance.
If you are working in a virtual environment, it is likely that your pip version is the default one (9.0.1). Try to upgrade it with pip install --upgrade pip and run the command python3 -m pip install pyarrow again.
Tested under Ubuntu 18.04, with Python 3.6.9 and pyarrow==4.0.0
Related
EDIT: Looks like I have to install Visual Studio 2015...Can I install dlib without VS 2015? I already have older versions pre-installed with Windows.
I am using Python 3.5, trying to install dlib on PyCharm in the terminal and this is what I am getting, and every search on these errors I do... I find stuff on Visual Studio which I don't have the GUI + I don't have vcvarsall.bat in the VC folder of any of the Visual Studio versions (8, 11, 12, 14). I have searched a good amount before posting this question on the Web.
Do I need to download Visual Studio latest version to get vcvarsall.bat ?
This is CMakeLists.txt:
cmake_minimum_required(VERSION ${CMAKE_VERSION})
project(IntelFortranImplicit Fortran)
add_custom_command(
OUTPUT output.cmake
COMMAND ${CMAKE_COMMAND} -P ${IntelFortranImplicit_SOURCE_DIR}/detect.cmake
)
add_library(FortranLib hello.f output.cmake)
This is the error when I do: pip install dlib
Collecting dlib
Using cached dlib-19.6.1.tar.gz
Building wheels for collected packages: dlib
Running setup.py bdist_wheel for dlib ... error
Complete output from command C:\Users\tiger\Anaconda3\envs\TensorFlowExample\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\tiger\\AppDat
a\\Local\\Temp\\pip-build-gjtgkl6a\\dlib\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code
, __file__, 'exec'))" bdist_wheel -d C:\Users\tiger\AppData\Local\Temp\tmprc21rnv_pip-wheel- --python-tag cp35:
running bdist_wheel
running build
error: Cannot find cmake, ensure it is installed and in the path.
You can install cmake using the instructions at https://cmake.org/install/
You can also specify its path with --cmake parameter.
----------------------------------------
Failed building wheel for dlib
Running setup.py clean for dlib
Failed to build dlib
Installing collected packages: dlib
Running setup.py install for dlib ... error
Complete output from command C:\Users\tiger\Anaconda3\envs\TensorFlowExample\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\tiger\\AppD
ata\\Local\\Temp\\pip-build-gjtgkl6a\\dlib\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(co
de, __file__, 'exec'))" install --record C:\Users\tiger\AppData\Local\Temp\pip-dk1naa28-record\install-record.txt --single-version-externally-managed --compile
:
running install
running build
error: Cannot find cmake, ensure it is installed and in the path.
You can install cmake using the instructions at https://cmake.org/install/
You can also specify its path with --cmake parameter.
----------------------------------------
Command "C:\Users\tiger\Anaconda3\envs\TensorFlowExample\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\tiger\\AppData\\Local\\Temp\\pip-bu
ild-gjtgkl6a\\dlib\\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\tiger\AppData\Local\Temp\pip-dk1naa28-record\install-record.txt --single-version-externally-managed --compile" failed with error code
1 in C:\Users\tiger\AppData\Local\Temp\pip-build-gjtgkl6a\dlib\
Solution found here: Using Anaconda installing manager..!
Running the following in PyCharm Terminal: conda install -c conda-forge dlib=19.4
I was able to use dlib! :)
Huge thanks to birryree in the comments for letting me know!
Open Anaconda Prompt in Administrative mode.
conda update conda 3. conda update anaconda
conda create -n dlib_env python=3.7
conda activate dlib_env
conda install -c conda-forge dlib
python
7.1 >>> import dlib 7.2 >>> dlib.version
Source
I downloaded wheel to the most recent version
But I'm not entirely sure how to make of this semi-cryptic error message
Failed building wheel for mysql-python
Command "/Users/username/Desktop/Project/venv/bin/python -u -c "import setuptools,
tokenize;__file__='/private/var/folders/bg/_nsyc_vxasdfx___h11f3jw00000gn/T/pip-build-rBf9R1/mysql-python/setup.py';
f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');
f.close();exec(compile(code, __file__, 'exec'))"
install --record /var/folders/bg/_nsyc_vx4g___xbsh11f3jw00000gn/T/pip-Tjwbij-record/install-record.txt --single-version-externally-managed
--compile --install-headers /Users/username/Desktop/project/venv/include/site/python2.7/mysql-python" failed with error code 1 in
/private/var/folders/bg/_nsyc_vxasdf__xbsh11f3jw00000gn/T/pip-build-rBf9R1/mysql-python/
I tried
pip install --upgrade wheel
and I get
Requirement already up-to-date: wheel
MySQL version
mysql Ver 14.14 Distrib 5.7.10, for osx10.11 (x86_64) using EditLine wrapper
As for me, it is because my system lack of python3 developing lib. It warns that there is no "Python.h" while installing. The following command fix it for me.
yum install python34-devel -y
pip3 install mysqlclient
The topic is quite old but for the people who might be suffered from having this problem,this can be your solution:
First of all,you must open the file where you use Python like 3.5,3.6,Anaconda etc. Then open cmd in that file and run the command below:
$ pip install mysqlclient==1.3.12
Apologies in advance if this is an easy fix, I have searched for an answer with no luck.
I'm trying to install the mysql-connector[-python] package on Amazon's Linux AMI. For my purposes, I want to use Python 3.4. I've installed Python 3.4 and pip-3.4 with yum and have successfully installed a few packages already:
pip-3.4 list
gives
numpy (1.11.1)
pip (6.1.1)
setuptools (25.1.4)
virtualenv (15.0.2)
However, when I try:
sudo pip-3.4 install mysql-connector-python
I get
Collecting mysql-connector-python
Could not find a version that satisfies the requirement mysql-connector-python (from versions: )
No matching distribution found for mysql-connector-python
sudo pip-3.4 install mysql-connector-python --allow-external mysql-connector-python gives the same error. A google search suggested I use sudo pip-3.4 install mysql-connector-python-rf --allow-external mysql-connector-python-rf but then this gives the error:
Collecting mysql-connector-python-rf
Using cached mysql-connector-python-rf-2.1.3.tar.gz
Installing collected packages: mysql-connector-python-rf
Running setup.py install for mysql-connector-python-rf
Complete output from command /usr/bin/python3.4 -c "import setuptools, tokenize;__file__='/tmp/pip-build-hotls6f7/mysql-connector-python-rf/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-wzpbgx5g-record/install-record.txt --single-version-externally-managed --compile:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: option --single-version-externally-managed not recognized
----------------------------------------
Command "/usr/bin/python3.4 -c "import setuptools, tokenize;__file__='/tmp/pip-build-hotls6f7/mysql-connector-python-rf/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-wzpbgx5g-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-hotls6f7/mysql-connector-python-rf
I've tried a number of things, such as
echo https://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-2.1.3.tar.gz >> requirements.txt
sudo -H pip-3.4 install -r ./requirements.txt
which gives a similar error,
sudo pip-3.4 install https://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-2.1.3.tar.gz
which gives the same error: option --single-version-externally-managed not recognized error. I should also note that pip suggests I upgrade using sudo pip-3.4 install --upgrade pip, but when I do this pip breaks completely, even pip-3.4 list or pip-3.4 --version gives me pkg_resources.VersionConflict: (pip 8.1.2 (/usr/local/lib/python3.4/site-packages), Requirement.parse('pip==6.1.1')).
I'm at a bit of loss as to what to do, any help would be greatly appreciated.
Answering my own question here, I know it doesn't solve the problem I had directly, but I've managed to get mysql-connector installed so that, in Python3(.4), import mysql.connector doesn't give any errors. Here's what I did:
wget http://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-2.0.4.zip#md5=3df394d89300db95163f17c843ef49df
unzip mysql-connector-python-2.0.4.zip
cd mysql-connector-python-2.0.4
sudo python3 setup.py install
Now, in Python3:
>>>import mysql.connector
>>>
I'm still curious as to why I had previously gotten the error error: option --single-version-externally-managed not recognized. My guess is that it's an issue with setuptools, but I had upgraded it to the newest version (as well as virtualenv).
I am trying to install scrapy module in Ubuntu (running in Virtualbox on a Windows Machine).
When I do pip install scrapy, I get the following error at the end of the install:
Command /usr/bin/python -c "import setuptools, tokenise;
__file__='/tmp/pip-build-csKz7u/Twisted/setup.py';
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))"
install --record /tmp/pip-FIY6qO-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-csKz7u/Twisted
Storing debug log for failure in /root/.pip/pip.log
What am I missing or doing wrong here?
Ubuntu doesn't come with the python header and library by default it's in python-dev. Run the following to install before installing scrapy.
sudo apt-get update; sudo apt-get install python-dev -y
I am trying to intall gcovr on ubuntu using
pip install gcovr
but it gives this error
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_mymachine/gcovr/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-uqjIdg-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_mymachin/gcovr
Storing debug log for failure in /home/mymachin/.pip/pip.log
Any ideas?
Thanks
I had no problems installing it this way:
sudo pip install gcovr
No errors.
If you're on Ubuntu 14.04, you may need to upgrade your pip.
curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
sudo python get-pip.py