Package installation error in Django channels - python

I am having the error shown below when I type the installation command of channels: python -m pip install -U channels
running build_ext
building 'twisted.test.raiser' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Bu
ild Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
ERROR: Failed building wheel for twisted
Running setup.py clean for twisted
Failed to build twisted
Installing collected packages: twisted, daphne, channels
Running setup.py install for twisted ... error

I installed the twisted .whl file from binary python extensions which is compatible with my python version

Related

Issue installing Scrapy using Python 3.11 on Windows 11

I'm using Windows 11, Python 3.10.1. I created a virtual environment using venv, and installed scrapy, and all requirements. Everything worked perfectly! Then I installed Python 3.11.1, created a virtual environment using venv, installed scrapy, and I received an error:
Building wheel for twisted-iocpsupport (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for twisted-iocpsupport (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [5 lines of output]
running bdist_wheel
running build
running build_ext
building 'twisted_iocpsupport.iocpsupport' 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 twisted-iocpsupport
Failed to build twisted-iocpsupport
ERROR: Could not build wheels for twisted-iocpsupport, which is required to install pyproject.toml-based projects
Issue of concern
I already had Microsoft Visual C++ 14.0 installed on my device, and I was able to run scrapy 2.7.1 successfully using Python 3.10. I only experienced this issue with Python 3.11.
Mitigation attempts
Installed a fresh copy of Microsoft Visual C++ 14.0 from the website ~ No resolve. ❌
Uninstalled, reinstalled Python 3.11 ensuring PATH was installed ~ No resolve. ❌
Created a virtual environment using pipenv, and Python 3.11. Same error as using venv ~ no resolve. ❌
Created a virtual environment using venv, and Python 3.10 ~ Scrapy works! ✅
Created a virtual environment using pipenv, and Python 3.10 ~ Scrapy works! ✅
So it seems like this is specific to Python 3.11 perhaps. So, right now I am back to using Python 3.10 for Scrapy projects.
Question
How can I resolve this issue, and use Python 3.11 for Scrapy projects?

Installation error of scikit-image in python-3.11.0

Getting errors when installing scikit-image with python-3.11.0.
The package is simply installed via pip install scikit-image or python -m pip install -U scikit-image.
The error messages showed that the problem occur on the wheel building process, and therefore hinder the scikit-image installation. How could I fix this problem?
Error messages:
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/
INFO: CCompilerOpt.cache_flush[857] : write cache to path -> C:\Users\admin\AppData\Local\Temp\pip-install-z_bg8g6d\scikit-image_ae4333805d744761b97e8cd984f9e2c1\build\temp.win-amd64-3.11\Release\ccompiler_opt_cache_ext.py
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for scikit-image
Failed to build scikit-image
ERROR: Could not build wheels for scikit-image, which is required to install pyproject.toml-based projects
Environment:
affine==2.3.1
attrs==22.1.0
beautifulsoup4==4.11.1
certifi==2022.9.24
charset-normalizer==2.1.1
click==8.1.3
click-plugins==1.1.1
cligj==0.7.2
colorama==0.4.6
contourpy==1.0.6
cycler==0.11.0
docopt==0.6.2
Fiona # file:///C:/Users/admin/pipwin/Fiona-1.8.21-cp311-cp311-win_amd64.whl
fonttools==4.38.0
GDAL # file:///C:/Users/admin/pipwin/GDAL-3.4.3-cp311-cp311-win_amd64.whl
geopandas==0.12.1
idna==3.4
Js2Py==0.74
kiwisolver==1.4.4
matplotlib==3.6.2
munch==2.5.0
numpy==1.23.4
opencv-contrib-python==4.6.0.66
packaging==21.3
pandas==1.5.1
Pillow==9.3.0
pipwin==0.5.2
pyjsparser==2.7.1
pyparsing==3.0.9
PyPrind==2.11.3
pyproj==3.4.0
pySmartDL==1.3.4
python-dateutil==2.8.2
pytz==2022.6
pytz-deprecation-shim==0.1.0.post0
rasterio==1.3.3
requests==2.28.1
rioxarray==0.12.4
Shapely==1.8.5.post1
six==1.16.0
snuggs==1.4.7
soupsieve==2.3.2.post1
tzdata==2022.6
tzlocal==4.2
urllib3==1.26.12
xarray==2022.11.0
Two approaches were suggested:
Downgrades to an older python version:
Nathan answer
Install Visual Studio C++ compiler, as mentioned in: https://wiki.python.org/moin/WindowsCompilers
However, I would like to stay on current python version, and I'm getting stuck in the second approach.
In my case, this problem was solved via installing a wheel file from:
https://www.lfd.uci.edu/~gohlke/pythonlibs/#scikit-image
In my case, I download the cp311 windows amd64 version.
Then, install the .whl file to the virtual environment
(env) D:\env>python -m pip install D:\Download\scikit_image-0.19.3-cp311-cp311-win_amd64.whl
Finally, the scikit-image was successfully installed.

cx Oracle Microsoft Visual C++ 14.0 or greater is required Get ItWith "MS C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

I have a problem installing cx_Oracle on WinServer without internet connection:
Building wheels for collected packages: cx_Oracle
Building wheel for cx_Oracle (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for cx_Oracle (pyproject.toml) did not run successfully.
¦ exit code: 1
?-> [7 lines of output]
C:\Users\F6GADKM\AppData\Local\Temp\2\pip-build-env-806_5jc6\overlay\Lib\site-packages\setuptools\config\expand.py:144: UserWarning: File 'C:\\Users\\F6GADKM\\AppData\\Local\\Temp\\2\\pip-install-r8jb3ohi\\cx-oracle_111cfa7e3d91425bb65e9a6baa89c82f\\README.md' cannot be found
warnings.warn(f"File {path!r} cannot be found")
running bdist_wheel
running build
running build_ext
building 'cx_Oracle' 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 cx_Oracle
Failed to build cx_Oracle
ERROR: Could not build wheels for cx_Oracle, which is required to install pyproject.toml-based projects
All steps to install build tools:
1. Download build tools
2. Download layout files for offline installation:
possible workloads are specified here. Following command contains workloads for msbuild and C++ build tools.
3. Run (exe file will have some version numbers in name):
vs_BuildTools.exe --layout c:\BT2017offline
--add Microsoft.VisualStudio.Workload.MSBuildTools
--add Microsoft.VisualStudio.Workload.VCTools
--add Microsoft.VisualStudio.Workload.WebBuildTools
--add Microsoft.VisualStudio.Workload.NetCoreBuildTools --lang en-US
4. Copy c:\BT2017offline to box on which you want to install it.
5. Open mmc and import all certificates from c:\BT2017offline\certificates to "Trusted Root Certification Authorities" of computer (not current user)
6. Run (exe file will have some version numbers in name):
c:\BT2017offline\vs_BuildTools.exe --noweb
Continue clicking next ...
VisualStudio Build Tools 2017 offline installer
But still I get cx_Oracle error.
Has anyone solved a similar problem yet?
please help

While I am installing cryptography in django project using pycharm, I got the error. Failed building wheel for cryptography

While I am installing cryptography got the following error.
Failed building wheel for cryptography
Running setup.py clean for cryptography
Failed to build cryptography
Could not build wheels for cryptography which use PEP 517 and cannot be installed directly
i was have same problem
my config was : python==3.7 django==2.2 pip==19.0.3
and its not from pycharm
its from pip
just upgrade pip to 21.0.1
Update:
some error code:
running build_rust
=============================DEBUG ASSISTANCE=============================
If you are seeing a compilation error please try the following steps to
successfully install cryptography:
1) Upgrade to the latest pip and try again. This will fix errors for most
users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
2) Read https://cryptography.io/en/latest/installation.html for specific
instructions for your platform.
3) Check our frequently asked questions for more information:
https://cryptography.io/en/latest/faq.html
4) Ensure you have a recent Rust toolchain installed:
https://cryptography.io/en/latest/installation.html#rust
5) If you are experiencing issues with Rust for *this release only* you may
set the environment variable `CRYPTOGRAPHY_DONT_BUILD_RUST=1`.
=============================DEBUG ASSISTANCE=============================
error: Can not find Rust compiler
----------------------------------------
Running setup.py clean for cryptography
Failed to build cryptography
Failed building wheel for cryptography
Could not build wheels for cryptography which use PEP 517 and cannot be installed directly

Install qiskit on MacOS HighSierra Error: No such file or directory: 'qiskit.egg-info'

I was trying to install QISKit via the pip method as mentioned on their webpage.
However, after many trials, this method doesn't seem to work and I am getting the following error on the terminal.
Compiling QISKit C++ Simulator
creating out
WARNING: Seems like the cpp simulator can't be built, Qiskit will install anyway, but won't have this simulator support.
installing to build/bdist.macosx-10.6-x86_64/wheel
running install
running install_lib
warning: install_lib: 'build/lib' does not exist -- no Python modules to install
running install_egg_info
Copying qiskit.egg-info to build/bdist.macosx-10.6-x86_64/wheel/qiskit-0.4.9.data/purelib/qiskit-0.4.9-py3.5.egg-info
error: [Errno 2] No such file or directory: 'qiskit.egg-info'
----------------------------------------
Failed building wheel for qiskit (*)
Running setup.py clean for qiskit
Failed to build qiskit
Installing collected packages: Sphinx, qiskit
Found existing installation: Sphinx 1.4.6
Cannot remove entries from nonexistent file /Users/photon/anaconda3/lib/python3.5/site-packages/easy-install.pth (*)
where the lines ending with (*) are in red in the terminal.
How can I solve this?
You can try to install cmake.
pip install cmake
I also had an issue with the latest QISKit. Kindly check the issue at the github page QIS Issue 292.

Categories