Category : distutils

My file directory is as follows: . ├── core │   ├── __init__.py │   ├── log.py │   └── test.py ├── requirements.txt ├── test.py requirements.txt Cython==0.29.26 matplotlib==3.3.4 pandas==1.2.3 psutil==5.6.7 requests==2.25.1 log.py import logging import time import os import logging.handlers class Log(object): def __init__(self, log_path, log_name=’log’) -> None: super().__init__() assert isinstance(log_path, str) print(f'{log_path} init success’) ”’ logger = ..

Read more

I had a working code of disutils in setup.py file like the following from distutils.command.install import INSTALL_SCHEMES for scheme in list(INSTALL_SCHEMES.values()): scheme[‘data’] = scheme[‘purelib’] but today I got the following error while trying to run CI in github action Traceback (most recent call last): File "/home/runner/work/kombu/kombu/setup.py", line 60, in <module> scheme[‘data’] = scheme[‘purelib’] KeyError: ‘purelib’ ..

Read more

I want my python extension module (pymyext1.pyd) to be under site-packages/pymyext1/ directory. In site-packages/pymyext1/ there should be two files: __init__.py and pymyext1.pyd. __init__.py contains a simple import of pymyext1.pyd. How my setup function in my setup.py should look like? Currently, I have this: setup( name="pymyext1", version="0.1", ext_modules=[Extension("pymyext1", ["main.c"])], include_package_data=True, package_dir={"pymyext1": "pymyext1"}, packages=["pymyext1"], package_data={"pymyext1": ["*.pyd"]}, ) ..

Read more

I want to install python3-distutils on my Kali Linux. But when I type the command sudo apt install python3-distutils, it gives the following error: dpkg: error processing archive /var/cache/apt/archives/python3-distutils_3.9.7-1_all.deb (–unpack): error creating hard link ‘./usr/lib/python3.9/distutils/README’: No such file or directory Errors were encountered while processing: /var/cache/apt/archives/python3-distutils_3.9.7-1_all.deb What should I do? Source: Python-3x..

Read more

Pipenv fails creating virtualenv with error below. Any solution on how to solve this? ❯ pipenv shell Creating a virtualenv for this project… Pipfile: /home/xxx/Pipfile Using /usr/bin/python3 (3.10.0) to create virtualenv… ⠹ Creating virtual environment… RuntimeError: failed to query /usr/bin/python3 with code 1 err: ‘/usr/local/lib/python3.8/dist-packages/virtualenv/discovery/py_info.py:16: DeprecationWarning: The distutils package is deprecated and slated for removal ..

Read more

I was wanting to upgrade my python version (to 3.10 in this case) so after installing python3.10 I proceeded to try adding some modules I use e.g. opencv , which ran into: [email protected]:~$ python3.10 -m pip install opencv-python Traceback (most recent call last): File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.10/runpy.py", ..

Read more

Hey guys I’m trying to run this code I found on Github but I keep getting this error when i run the build.py file. File "build.py", line 15, in ffi = BuildExtension( File "/home/s2209462/test_1/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 372, in init super(BuildExtension, self).init(*args, **kwargs) File "/home/s2209462/test_1/lib/python3.8/site-packages/setuptools/init.py", line 172, in init _Command.init(self, dist) File "/deepstore/software/anaconda3/2020.11/lib/python3.8/distutils/cmd.py", line 57, in init ..

Read more