Errors in pip install flask-socketio - python

I am trying to install flask-socketio from terminal
pip install flask-socketio
but it keep showing me the following error(in bold):
Collecting flask-socketio
Using cached Flask-SocketIO-2.9.2.tar.gz
Requirement already satisfied: Flask>=0.9 in /Library/Python/2.7/site-packages (from flask-socketio)
Collecting python-socketio>=1.5.0 (from flask-socketio)
Using cached python-socketio-1.8.0.tar.gz
Collecting python-engineio>=1.0.0 (from flask-socketio)
Using cached python-engineio-1.7.0.tar.gz
Requirement already satisfied: itsdangerous>=0.21 in /Library/Python/2.7/site-packages (from Flask>=0.9->flask-socketio)
Requirement already satisfied: Werkzeug>=0.7 in /Library/Python/2.7/site-packages (from Flask>=0.9->flask-socketio)
Requirement already satisfied: Jinja2>=2.4 in /Library/Python/2.7/site-packages (from Flask>=0.9->flask-socketio)
Requirement already satisfied: click>=2.0 in /Library/Python/2.7/site-packages (from Flask>=0.9->flask-socketio)
Requirement already satisfied: six>=1.9.0 in /Library/Python/2.7/site-packages (from python-socketio>=1.5.0->flask-socketio)
Requirement already satisfied: MarkupSafe>=0.23 in /Library/Python/2.7/site-packages (from Jinja2>=2.4->Flask>=0.9->flask-socketio)
Installing collected packages: python-engineio, python-socketio, flask-socketio
Running setup.py install for python-engineio ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/_g/m9lwl1yn5g5_wz3d57qc1qh40000gn/T/pip-build-1eGNas/python-engineio/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/_g/m9lwl1yn5g5_wz3d57qc1qh40000gn/T/pip-U9szix-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/engineio
copying engineio/__init__.py -> build/lib/engineio
copying engineio/async_aiohttp.py -> build/lib/engineio
copying engineio/async_eventlet.py -> build/lib/engineio
copying engineio/async_gevent.py -> build/lib/engineio
copying engineio/async_gevent_uwsgi.py -> build/lib/engineio
copying engineio/async_sanic.py -> build/lib/engineio
copying engineio/async_threading.py -> build/lib/engineio
copying engineio/asyncio_server.py -> build/lib/engineio
copying engineio/asyncio_socket.py -> build/lib/engineio
copying engineio/exceptions.py -> build/lib/engineio
copying engineio/middleware.py -> build/lib/engineio
copying engineio/packet.py -> build/lib/engineio
copying engineio/payload.py -> build/lib/engineio
copying engineio/server.py -> build/lib/engineio
copying engineio/socket.py -> build/lib/engineio
running egg_info
writing requirements to python_engineio.egg-info/requires.txt
writing python_engineio.egg-info/PKG-INFO
writing top-level names to python_engineio.egg-info/top_level.txt
writing dependency_links to python_engineio.egg-info/dependency_links.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'python_engineio.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'README.md'
writing manifest file 'python_engineio.egg-info/SOURCES.txt'
running install_lib
creating /Library/Python/2.7/site-packages/engineio
error: could not create '/Library/Python/2.7/site-packages/engineio': Permission denied
----------------------------------------
**Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/_g/m9lwl1yn5g5_wz3d57qc1qh40000gn/T/pip-build-1eGNas/python-engineio/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/_g/m9lwl1yn5g5_wz3d57qc1qh40000gn/T/pip-U9szix-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/_g/m9lwl1yn5g5_wz3d57qc1qh40000gn/T/pip-build-1eGNas/python-engineio/**
I have tried updating my pip and basically went through mostly all related questions in stackoverflow but I am getting permission denied and its asking me to import some setup tools.

If you want to install something to system python libs, try sudo pip install flask-socketio. Or use virtualenv

Related

I am unable to install wordcloud on vscode

I was working with sentiment analysis today, and when i started importing libraries i am unable to install wordcloud. it gives me an error as follows when i try to install pip install wordcloud. i also tried to install it by downloading it and copying it to my current directory and python -m pip install wordcloud-1.8.1-cp38-cp38-win_amd64.whl but that does not work too.
i.e. i am using windows, vscode and python3.9
The log error is
PS E:\projects\python\sentiment> pip install wordcloud
Collecting wordcloud
Using cached wordcloud-1.8.1.tar.gz (220 kB)
Requirement already satisfied: numpy>=1.6.1 in c:\users\robel\appdata\local\programs\python\python39\lib\site-packages (from wordcloud) (1.20.3)
Requirement already satisfied: pillow in c:\users\robel\appdata\local\programs\python\python39\lib\site-packages (from wordcloud) (8.2.0)
Requirement already satisfied: matplotlib in c:\users\robel\appdata\local\programs\python\python39\lib\site-packages (from wordcloud) (3.4.2)
Requirement already satisfied: pyparsing>=2.2.1 in c:\users\robel\appdata\local\programs\python\python39\lib\site-packages (from matplotlib->wordcloud) (2.4.7)
Requirement already satisfied: cycler>=0.10 in c:\users\robel\appdata\local\programs\python\python39\lib\site-packages (from matplotlib->wordcloud) (0.10.0)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\robel\appdata\local\programs\python\python39\lib\site-packages (from matplotlib->wordcloud) (1.3.1)
Requirement already satisfied: python-dateutil>=2.7 in c:\users\robel\appdata\local\programs\python\python39\lib\site-packages (from matplotlib->wordcloud) (2.8.1)
Requirement already satisfied: six in c:\users\robel\appdata\local\programs\python\python39\lib\site-packages (from cycler>=0.10->matplotlib->wordcloud) (1.16.0)
Using legacy 'setup.py install' for wordcloud, since package 'wheel' is not installed.
Installing collected packages: wordcloud
Running setup.py install for wordcloud ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\robel\appdata\local\programs\python\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Robel\AppData\Local\Temp\pip-install-ij5wisei\wordcloud_65d6145d63024c6693ae2f4a8a7fb0a8\setup.py'"'"'; file='"'"'C:\Users\Robel\AppData\Local\Temp\pip-install-ij5wisei\wordcloud_65d6145d63024c6693ae2f4a8a7fb0a8\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 'C:\Users\Robel\AppData\Local\Temp\pip-record-ppnm2m4u\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\robel\appdata\local\programs\python\python39\Include\wordcloud'
cwd: C:\Users\Robel\AppData\Local\Temp\pip-install-ij5wisei\wordcloud_65d6145d63024c6693ae2f4a8a7fb0a8
Complete output (20 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\wordcloud
copying wordcloud\color_from_image.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\tokenization.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\wordcloud.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\wordcloud_cli.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud_version.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud_init_.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud_main_.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\stopwords -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\DroidSansMono.ttf -> build\lib.win-amd64-3.9\wordcloud
UPDATING build\lib.win-amd64-3.9\wordcloud/_version.py
set build\lib.win-amd64-3.9\wordcloud/_version.py to '1.8.1'
running build_ext
building 'wordcloud.query_integral_image' 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: Command errored out with exit status 1: 'c:\users\robel\appdata\local\programs\python\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Robel\AppData\Local\Temp\pip-install-ij5wisei\wordcloud_65d6145d63024c6693ae2f4a8a7fb0a8\setup.py'"'"'; file='"'"'C:\Users\Robel\AppData\Local\Temp\pip-install-ij5wisei\wordcloud_65d6145d63024c6693ae2f4a8a7fb0a8\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 'C:\Users\Robel\AppData\Local\Temp\pip-record-ppnm2m4u\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\robel\appdata\local\programs\python\python39\Include\wordcloud' Check the logs for full command output.
Try installed worcloud by .whl file.
Choose the version that suit for you. Wordcloud.whl
Use cmd and type this command:
step 1
cd *your file directory path*
step 2
pip install *the file name.whl*
The comment made by #Wojciech Jakubas is what worked for me.
Download the wordcloud‑1.8.1‑cp39‑cp39‑win_amd64.whl file from here
(Note that the cp39 in the filename reflects the python version YOU are using, so make sure you download the compatible file. e.g. here cp39 means python 3.9)
Open the command prompt in the directory where the downloaded file is located. Or just cd your way there.
Run this command python -m pip install wordcloud-1.8.1-cp39-cp39-win_amd64.whl
(again make sure to use the specific filename of the file that you download as that may vary depending on what python version you're downloading your file for)
I'm making this comment, for one because my reputation is too low to reply others and second because this answer sort of makes the steps involved explicit for accessibility's sake.
The problem is that wordcloud has no prebuilt wheels for python3.9 on windows. Therefore when you install it it will download the source code and try to build the wheel.
In order to successfully build this wheel you need a c compiler.
As the error suggests you can download Microsoft C++ Build Tools.
After downloading and installing (make sure you have the correct version between 32 and 64 bit depending on your python architecture) then retry doing pip install wordcloud

Unable to install Lightfm

This is the error that I'm getting whenever I try to install a certain few libraries. I have tried updating my pip to the latest version. And I'm using python 3.8.5
C:\Users\Deep\Desktop\Sentiment Analysis>pip install lightfm
Collecting lightfm
Using cached lightfm-1.16.tar.gz (310 kB)
Requirement already satisfied: numpy in c:\users\deep\appdata\local\programs\python\python39\lib\site-packages (from lightfm) (1.20.1)
Requirement already satisfied: scipy>=0.17.0 in c:\users\deep\appdata\local\programs\python\python39\lib\site-packages (from lightfm) (1.6.1)
Requirement already satisfied: requests in c:\users\deep\appdata\local\programs\python\python39\lib\site-packages (from lightfm) (2.11.1)
Requirement already satisfied: scikit-learn in c:\users\deep\appdata\local\programs\python\python39\lib\site-packages (from lightfm) (0.24.1)
Requirement already satisfied: joblib>=0.11 in c:\users\deep\appdata\local\programs\python\python39\lib\site-packages (from scikit-learn->lightfm) (1.0.1)
Requirement already satisfied: threadpoolctl>=2.0.0 in c:\users\deep\appdata\local\programs\python\python39\lib\site-packages (from scikit-learn->lightfm) (2.1.0)
Using legacy 'setup.py install' for lightfm, since package 'wheel' is not installed.
Installing collected packages: lightfm
Running setup.py install for lightfm ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\deep\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Deep\\AppData\\Local\\Temp\\pip-install-2woi0con\\lightfm_42fc377b52074fbd9b3c493179e0e9fd\\setup.py'"'"'; __file__='"'"'C:\\Users\\Deep\\AppData\\Local\\Temp\\pip-install-2woi0con\\lightfm_42fc377b52074fbd9b3c493179e0e9fd\\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\Deep\AppData\Local\Temp\pip-record-2y1qyoq6\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\deep\appdata\local\programs\python\python39\Include\lightfm'
cwd: C:\Users\Deep\AppData\Local\Temp\pip-install-2woi0con\lightfm_42fc377b52074fbd9b3c493179e0e9fd\
Complete output (23 lines):
Compiling without OpenMP support.
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\lightfm
copying lightfm\cross_validation.py -> build\lib.win-amd64-3.9\lightfm
copying lightfm\data.py -> build\lib.win-amd64-3.9\lightfm
copying lightfm\evaluation.py -> build\lib.win-amd64-3.9\lightfm
copying lightfm\lightfm.py -> build\lib.win-amd64-3.9\lightfm
copying lightfm\_lightfm_fast.py -> build\lib.win-amd64-3.9\lightfm
copying lightfm\__init__.py -> build\lib.win-amd64-3.9\lightfm
creating build\lib.win-amd64-3.9\lightfm\datasets
copying lightfm\datasets\movielens.py -> build\lib.win-amd64-3.9\lightfm\datasets
copying lightfm\datasets\stackexchange.py -> build\lib.win-amd64-3.9\lightfm\datasets
copying lightfm\datasets\_common.py -> build\lib.win-amd64-3.9\lightfm\datasets
copying lightfm\datasets\__init__.py -> build\lib.win-amd64-3.9\lightfm\datasets
copying lightfm\_lightfm_fast_no_openmp.c -> build\lib.win-amd64-3.9\lightfm
copying lightfm\_lightfm_fast_openmp.c -> build\lib.win-amd64-3.9\lightfm
running build_ext
building 'lightfm._lightfm_fast_no_openmp' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\deep\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Deep\\AppData\\Local\\Temp\\pip-install-2woi0con\\lightfm_42fc377b52074fbd9b3c493179e0e9fd\\setup.py'"'"'; __file__='"'"'C:\\Users\\Deep\\AppData\\Local\\Temp\\pip-install-2woi0con\\lightfm_42fc377b52074fbd9b3c493179e0e9fd\\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\Deep\AppData\Local\Temp\pip-record-2y1qyoq6\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\deep\appdata\local\programs\python\python39\Include\lightfm' Check the logs for full command output.
try to install Build Tools for Visual Studio like it says in error and you can get it here https://visualstudio.microsoft.com/downloads/ or here https://visualstudio.microsoft.com/cs/visual-cpp-build-tools/

Can't install pycuda with pip

I am trying to install the PyCUDA module to run some python script I downloaded, but trying to install it with pip doesn't work.
I run pip install pycuda on the command line
At first, I get this:
Collecting pycuda
Using cached pycuda-2020.1.tar.gz (1.6 MB)
Requirement already satisfied: pytools>=2011.2 in c:\users\jules\appdata\local\programs\python\python36-32\lib\site-packages (from pycuda) (2020.4)
Requirement already satisfied: decorator>=3.2.0 in c:\users\jules\appdata\local\programs\python\python36-32\lib\site-packages (from pycuda) (4.4.2)
Requirement already satisfied: appdirs>=1.4.0 in c:\users\jules\appdata\local\programs\python\python36-32\lib\site-packages (from pycuda) (1.4.4)
Requirement already satisfied: mako in c:\users\jules\appdata\local\programs\python\python36-32\lib\site-packages (from pycuda) (1.1.3)
Requirement already satisfied: six>=1.8.0 in c:\users\jules\appdata\local\programs\python\python36-32\lib\site-packages (from pytools>=2011.2->pycuda) (1.11.0)
Requirement already satisfied: numpy>=1.6.0 in c:\users\jules\appdata\local\programs\python\python36-32\lib\site-packages (from pytools>=2011.2->pycuda) (1.14.1)
Requirement already satisfied: MarkupSafe>=0.9.2 in c:\users\jules\appdata\local\programs\python\python36-32\lib\site-packages (from mako->pycuda) (1.1.1)
Using legacy 'setup.py install' for pycuda, since package 'wheel' is not installed.
Installing collected packages: pycuda
Running setup.py install for pycuda ... error
Then, this appears (all in red):
ERROR: Command errored out with exit status 1:
command: 'c:\users\jules\appdata\local\programs\python\python36-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Jules\\AppData\\Local\\Temp\\pip-install-rehu_ea2\\pycuda\\setup.py'"'"'; __file__='"'"'C:\\Users\\Jules\\AppData\\Local\\Temp\\pip-install-rehu_ea2\\pycuda\\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\Jules\AppData\Local\Temp\pip-record-vlpoymu1\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\jules\appdata\local\programs\python\python36-32\Include\pycuda'
cwd: C:\Users\Jules\AppData\Local\Temp\pip-install-rehu_ea2\pycuda\
Complete output (82 lines):
***************************************************************
*** WARNING: nvcc not in path.
*** May need to set CUDA_INC_DIR for installation to succeed.
***************************************************************
*************************************************************
*** I have detected that you have not run configure.py.
*************************************************************
*** Additionally, no global config files were found.
*** I will go ahead with the default configuration.
*** In all likelihood, this will not work out.
***
*** See README_SETUP.txt for more information.
***
*** If the build does fail, just re-run configure.py with the
*** correct arguments, and then retry. Good luck!
*************************************************************
*** HIT Ctrl-C NOW IF THIS IS NOT WHAT YOU WANT
*************************************************************
Continuing in 1 seconds...
c:\users\jules\appdata\local\programs\python\python36-32\lib\distutils\dist.py:261: UserWarning: Unknown distribution option: 'test_requires'
warnings.warn(msg)
running install
running build
running build_py
creating build
creating build\lib.win32-3.6
creating build\lib.win32-3.6\pycuda
copying pycuda\autoinit.py -> build\lib.win32-3.6\pycuda
copying pycuda\characterize.py -> build\lib.win32-3.6\pycuda
copying pycuda\compiler.py -> build\lib.win32-3.6\pycuda
copying pycuda\cumath.py -> build\lib.win32-3.6\pycuda
copying pycuda\curandom.py -> build\lib.win32-3.6\pycuda
copying pycuda\debug.py -> build\lib.win32-3.6\pycuda
copying pycuda\driver.py -> build\lib.win32-3.6\pycuda
copying pycuda\elementwise.py -> build\lib.win32-3.6\pycuda
copying pycuda\gpuarray.py -> build\lib.win32-3.6\pycuda
copying pycuda\reduction.py -> build\lib.win32-3.6\pycuda
copying pycuda\scan.py -> build\lib.win32-3.6\pycuda
copying pycuda\tools.py -> build\lib.win32-3.6\pycuda
copying pycuda\_cluda.py -> build\lib.win32-3.6\pycuda
copying pycuda\_mymako.py -> build\lib.win32-3.6\pycuda
copying pycuda\__init__.py -> build\lib.win32-3.6\pycuda
creating build\lib.win32-3.6\pycuda\gl
copying pycuda\gl\autoinit.py -> build\lib.win32-3.6\pycuda\gl
copying pycuda\gl\__init__.py -> build\lib.win32-3.6\pycuda\gl
creating build\lib.win32-3.6\pycuda\sparse
copying pycuda\sparse\cg.py -> build\lib.win32-3.6\pycuda\sparse
copying pycuda\sparse\coordinate.py -> build\lib.win32-3.6\pycuda\sparse
copying pycuda\sparse\inner.py -> build\lib.win32-3.6\pycuda\sparse
copying pycuda\sparse\operator.py -> build\lib.win32-3.6\pycuda\sparse
copying pycuda\sparse\packeted.py -> build\lib.win32-3.6\pycuda\sparse
copying pycuda\sparse\pkt_build.py -> build\lib.win32-3.6\pycuda\sparse
copying pycuda\sparse\__init__.py -> build\lib.win32-3.6\pycuda\sparse
creating build\lib.win32-3.6\pycuda\compyte
copying pycuda\compyte\array.py -> build\lib.win32-3.6\pycuda\compyte
copying pycuda\compyte\dtypes.py -> build\lib.win32-3.6\pycuda\compyte
copying pycuda\compyte\__init__.py -> build\lib.win32-3.6\pycuda\compyte
running egg_info
writing pycuda.egg-info\PKG-INFO
writing dependency_links to pycuda.egg-info\dependency_links.txt
writing requirements to pycuda.egg-info\requires.txt
writing top-level names to pycuda.egg-info\top_level.txt
reading manifest file 'pycuda.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'doc\source\_static\*.css'
warning: no files found matching 'doc\source\_templates\*.html'
warning: no files found matching '*.cpp' under directory 'bpl-subset\bpl_subset\boost'
warning: no files found matching '*.html' under directory 'bpl-subset\bpl_subset\boost'
warning: no files found matching '*.inl' under directory 'bpl-subset\bpl_subset\boost'
warning: no files found matching '*.txt' under directory 'bpl-subset\bpl_subset\boost'
warning: no files found matching '*.h' under directory 'bpl-subset\bpl_subset\libs'
warning: no files found matching '*.ipp' under directory 'bpl-subset\bpl_subset\libs'
warning: no files found matching '*.pl' under directory 'bpl-subset\bpl_subset\libs'
writing manifest file 'pycuda.egg-info\SOURCES.txt'
creating build\lib.win32-3.6\pycuda\cuda
copying pycuda\cuda\pycuda-complex-impl.hpp -> build\lib.win32-3.6\pycuda\cuda
copying pycuda\cuda\pycuda-complex.hpp -> build\lib.win32-3.6\pycuda\cuda
copying pycuda\cuda\pycuda-helpers.hpp -> build\lib.win32-3.6\pycuda\cuda
copying pycuda\sparse\pkt_build_cython.pyx -> build\lib.win32-3.6\pycuda\sparse
running build_ext
building '_driver' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\jules\appdata\local\programs\python\python36-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Jules\\AppData\\Local\\Temp\\pip-install-rehu_ea2\\pycuda\\setup.py'"'"'; __file__='"'"'C:\\Users\\Jules\\AppData\\Local\\Temp\\pip-install-rehu_ea2\\pycuda\\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\Jules\AppData\Local\Temp\pip-record-vlpoymu1\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\jules\appdata\local\programs\python\python36-32\Include\pycuda' Check the logs for full command output.
I have no idea what this error is about, or how to fix it (and I don't want to get into complicated installations that will take me hours and might not even work). I'm not even sure what this module does (yet). Do you have an idea to help me?
(edit: I'm on Windows 10, and I have not installed anything about PyCUDA before)
Try the following.
pip install pipwin
pipwin install pycuda

Install wordcloud in jetbrains pycharm with python version 3.6 failed

I am trying to install wordcloud in pycharm (pip install wordcloud) with python 3.6 in terminal but getting this error. I install every library in terminal with pip install statement but failed to install wordcloud. How can I solve this?
(venv) C:\Users\Mansi Dhingra\Desktop\Projects\api>pip install wordcloud
Collecting wordcloud
Using cached https://files.pythonhosted.org/packages/6b/9f/27cec92eee9f1d4f02f986ad0cc6dfc0797b117be6e968da8f92c6c183aa/wordcloud-1.7.0.tar.gz
Requirement already satisfied: numpy>=1.6.1 in c:\users\mansi dhingra\desktop\projects\api\venv\lib\site-packages (from wordcloud)
Requirement already satisfied: pillow in c:\users\mansi dhingra\desktop\projects\api\venv\lib\site-packages (from wordcloud)
Requirement already satisfied: matplotlib in c:\users\mansi dhingra\desktop\projects\api\venv\lib\site-packages (from wordcloud)
Requirement already satisfied: python-dateutil>=2.1 in c:\users\mansi dhingra\desktop\projects\api\venv\lib\site-packages (from matplotlib->wordcloud)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\users\mansi dhingra\desktop\projects\api\venv\lib\site-packages (from matplotlib->wordcloud)
Requirement already satisfied: cycler>=0.10 in c:\users\mansi dhingra\desktop\projects\api\venv\lib\site-packages (from matplotlib->wordcloud)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\mansi dhingra\desktop\projects\api\venv\lib\site-packages (from matplotlib->wordcloud)
Requirement already satisfied: six>=1.5 in c:\users\mansi dhingra\desktop\projects\api\venv\lib\site-packages (from python-dateutil>=2.1->matplotlib->wordcloud)
Installing collected packages: wordcloud
Running setup.py install for wordcloud ... error
Complete output from command "C:\Users\Mansi Dhingra\Desktop\Projects\api\venv\Scripts\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\MANSID~1\\AppData\\Local\\T
emp\\pip-build-hzywsg3f\\wordcloud\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --r
ecord C:\Users\MANSID~1\AppData\Local\Temp\pip-otlfw3d1-record\install-record.txt --single-version-externally-managed --compile --install-headers "C:\Users\Mansi Dhingra\Desktop\Projects
\api\venv\include\site\python3.7\wordcloud":
C:\Users\Mansi Dhingra\AppData\Local\Programs\Python\Python37-32\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
running install
running build
running build_py
creating build
creating build\lib.win32-3.7
creating build\lib.win32-3.7\wordcloud
copying wordcloud\color_from_image.py -> build\lib.win32-3.7\wordcloud
copying wordcloud\tokenization.py -> build\lib.win32-3.7\wordcloud
copying wordcloud\wordcloud.py -> build\lib.win32-3.7\wordcloud
copying wordcloud\wordcloud_cli.py -> build\lib.win32-3.7\wordcloud
copying wordcloud\_version.py -> build\lib.win32-3.7\wordcloud
copying wordcloud\__init__.py -> build\lib.win32-3.7\wordcloud
copying wordcloud\__main__.py -> build\lib.win32-3.7\wordcloud
copying wordcloud\stopwords -> build\lib.win32-3.7\wordcloud
copying wordcloud\DroidSansMono.ttf -> build\lib.win32-3.7\wordcloud
UPDATING build\lib.win32-3.7\wordcloud/_version.py
set build\lib.win32-3.7\wordcloud/_version.py to '1.7.0'
running build_ext
building 'wordcloud.query_integral_image' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
----------------------------------------
Command ""C:\Users\Mansi Dhingra\Desktop\Projects\api\venv\Scripts\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\MANSID~1\\AppData\\Local\\Temp\\pip-build-hzywsg3f\
\wordcloud\\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\MANSID~1\
AppData\Local\Temp\pip-otlfw3d1-record\install-record.txt --single-version-externally-managed --compile --install-headers "C:\Users\Mansi Dhingra\Desktop\Projects\api\venv\include\site\p
ython3.7\wordcloud"" failed with error code 1 in C:\Users\MANSID~1\AppData\Local\Temp\pip-build-hzywsg3f\wordcloud\
wordcloud 1.7.0 provides a lot of wheels for w32 but not for Python 3.8. My advice downgrade to Python 3.7 64-bit.
If you want to install wordcloud for Python 3.8 you must have Microsoft Visual C++ 14.0 to compile C/C++ modules.

Python: installing a module successfully but it is not available via import

I'm using Jupyter Notebook and I want to import an external toolbox called bluepyopt. As it currently only runs in Python 2.7, I set up a Python 2.7 Kernel as described here. So I can change my kernel to python 2 in Jupyter Notebook.
If I want to import the module using
import bluepyopt as bpop
I get the error
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-83e46e18aae9> in <module>()
3
4 # to create electrical cell models
----> 5 import bluepyopt as bpop
6 import bluepyopt.ephys as ephys
7
ModuleNotFoundError: No module named 'bluepyopt'
I install bluepyopt the way I usually install modules with
!pip install bluepyopt
This also gives me an unsual super loooooong output. I don't know what is important here, so I will post all of it just to be sure. This only occurs in python 2.7 however, in python 3 everything works fine! Any idea why it is like that?
Collecting bluepyopt
Collecting efel>=2.11 (from bluepyopt)
Using cached efel-2.12.11.tar.gz
Collecting ipyparallel (from bluepyopt)
Using cached ipyparallel-6.0.2-py2.py3-none-any.whl
Requirement already satisfied: Jinja2>=2.8 in c:\users\alex\anaconda3\lib\site-packages (from bluepyopt)
Requirement already satisfied: pickleshare>=0.7.3 in c:\users\alex\anaconda3\lib\site-packages (from bluepyopt)
Requirement already satisfied: numpy>=1.6 in c:\users\alex\anaconda3\lib\site-packages (from bluepyopt)
Collecting scoop>=0.7 (from bluepyopt)
Requirement already satisfied: pandas>=0.18 in c:\users\alex\anaconda3\lib\site-packages (from bluepyopt)
Collecting future (from bluepyopt)
Requirement already satisfied: deap in c:\users\alex\anaconda3\lib\site-packages (from bluepyopt)
Requirement already satisfied: six in c:\users\alex\anaconda3\lib\site-packages (from efel>=2.11->bluepyopt)
Requirement already satisfied: ipython>=4 in c:\users\alex\anaconda3\lib\site-packages (from ipyparallel->bluepyopt)
Requirement already satisfied: ipykernel in c:\users\alex\anaconda3\lib\site-packages (from ipyparallel->bluepyopt)
Requirement already satisfied: python-dateutil>=2.1 in c:\users\alex\anaconda3\lib\site-packages (from ipyparallel->bluepyopt)
Requirement already satisfied: pyzmq>=13 in c:\users\alex\anaconda3\lib\site-packages (from ipyparallel->bluepyopt)
Requirement already satisfied: tornado>=4 in c:\users\alex\anaconda3\lib\site-packages (from ipyparallel->bluepyopt)
Requirement already satisfied: ipython-genutils in c:\users\alex\anaconda3\lib\site-packages (from ipyparallel->bluepyopt)
Requirement already satisfied: jupyter-client in c:\users\alex\anaconda3\lib\site-packages (from ipyparallel->bluepyopt)
Requirement already satisfied: decorator in c:\users\alex\anaconda3\lib\site-packages (from ipyparallel->bluepyopt)
Requirement already satisfied: MarkupSafe>=0.23 in c:\users\alex\anaconda3\lib\site-packages (from Jinja2>=2.8->bluepyopt)
Requirement already satisfied: greenlet>=0.3.4 in c:\users\alex\anaconda3\lib\site-packages (from scoop>=0.7->bluepyopt)
Collecting argparse>=1.1 (from scoop>=0.7->bluepyopt)
Using cached argparse-1.4.0-py2.py3-none-any.whl
Requirement already satisfied: pytz>=2011k in c:\users\alex\anaconda3\lib\site-packages (from pandas>=0.18->bluepyopt)
Building wheels for collected packages: efel
Running setup.py bdist_wheel for efel: started
Running setup.py bdist_wheel for efel: finished with status 'error'
Complete output from command C:\Users\Alex\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Alex\\AppData\\Local\\Temp\\pip-build-cygqwlch\\efel\\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\Alex\AppData\Local\Temp\tmp5k5lqwx6pip-wheel- --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\efel
copying efel\api.py -> build\lib.win-amd64-3.6\efel
copying efel\io.py -> build\lib.win-amd64-3.6\efel
copying efel\settings.py -> build\lib.win-amd64-3.6\efel
copying efel\_version.py -> build\lib.win-amd64-3.6\efel
copying efel\__init__.py -> build\lib.win-amd64-3.6\efel
copying efel\DependencyV5.txt -> build\lib.win-amd64-3.6\efel
creating build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\Utils.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\LibV1.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\LibV2.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\LibV3.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\LibV4.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\LibV5.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\FillFptrTable.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\DependencyTree.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\efel.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\cfeature.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\Global.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\mapoperations.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\types.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\eFELLogger.h -> build\lib.win-amd64-3.6\efel\cppcore
UPDATING build\lib.win-amd64-3.6\efel/_version.py
set build\lib.win-amd64-3.6\efel/_version.py to '2.12.11'
running build_ext
building 'efel.cppcore' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
----------------------------------------
Running setup.py clean for efel
Failed to build efel
Installing collected packages: efel, ipyparallel, argparse, scoop, future, bluepyopt
Running setup.py install for efel: started
Running setup.py install for efel: finished with status 'error'
Complete output from command C:\Users\Alex\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Alex\\AppData\\Local\\Temp\\pip-build-cygqwlch\\efel\\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\Alex\AppData\Local\Temp\pip-n69ud86n-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\efel
copying efel\api.py -> build\lib.win-amd64-3.6\efel
copying efel\io.py -> build\lib.win-amd64-3.6\efel
copying efel\settings.py -> build\lib.win-amd64-3.6\efel
copying efel\_version.py -> build\lib.win-amd64-3.6\efel
copying efel\__init__.py -> build\lib.win-amd64-3.6\efel
copying efel\DependencyV5.txt -> build\lib.win-amd64-3.6\efel
creating build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\Utils.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\LibV1.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\LibV2.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\LibV3.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\LibV4.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\LibV5.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\FillFptrTable.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\DependencyTree.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\efel.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\cfeature.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\Global.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\mapoperations.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\types.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\eFELLogger.h -> build\lib.win-amd64-3.6\efel\cppcore
UPDATING build\lib.win-amd64-3.6\efel/_version.py
set build\lib.win-amd64-3.6\efel/_version.py to '2.12.11'
running build_ext
building 'efel.cppcore' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
----------------------------------------
Failed building wheel for efel
Command "C:\Users\Alex\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Alex\\AppData\\Local\\Temp\\pip-build-cygqwlch\\efel\\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\Alex\AppData\Local\Temp\pip-n69ud86n-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Alex\AppData\Local\Temp\pip-build-cygqwlch\efel\
Requirement already satisfied: NEURON in c:\users\alex\anaconda3\lib\site-packages
Some more maybe useful information when using the python 2 kernel in Jupyter Notebook:
In [1]:
import sys
sys.executable
Out [1]:
'C:\\Users\\Alex\\Anaconda3\\envs\\ipykernel_py2\\python.exe' #kernel python 2.7
'C:\\Users\\Alex\\Anaconda3\\python.exe' #kernel python 3
In [2]:
from jupyter_core.paths import jupyter_data_dir
print(jupyter_data_dir())
Out[2]:
C:\Users\Alex\AppData\Roaming\jupyter
In[3]:
sys.path
Out[3]:
['',
'C:\\Users\\Alex\\Anaconda3\\envs\\ipykernel_py2\\python27.zip',
'C:\\Users\\Alex\\Anaconda3\\envs\\ipykernel_py2\\DLLs',
'C:\\Users\\Alex\\Anaconda3\\envs\\ipykernel_py2\\lib',
'C:\\Users\\Alex\\Anaconda3\\envs\\ipykernel_py2\\lib\\plat-win',
'C:\\Users\\Alex\\Anaconda3\\envs\\ipykernel_py2\\lib\\lib-tk',
'C:\\Users\\Alex\\Anaconda3\\envs\\ipykernel_py2',
'C:\\Users\\Alex\\Anaconda3\\envs\\ipykernel_py2\\lib\\site-packages',
'C:\\Users\\Alex\\Anaconda3\\envs\\ipykernel_py2\\lib\\site-packages\\IPython\\extensions',
'C:\\Users\\Alex\\.ipython']
In[4]:
!jupyter kernelspec list
Out[4]:
Available kernels:
python3 C:\Users\Alex\Anaconda3\share\jupyter\kernels\python3
python2 C:\ProgramData\jupyter\kernels\python2
As i can see the module is not properly installed and giving dependency for Microsoft Visual C++ 14.0.
Try to install Microsoft Visual C++ build tools from this link http://landinghub.visualstudio.com/visual-cpp-build-tools
Then try installing the module using pip again
pip install bluepyopt

Categories