juancarlospaco / faster-than-requests

Faster requests on Python 3
https://gist.github.com/juancarlospaco/37da34ed13a609663f55f4466c4dbc3e
MIT License
1.11k stars 89 forks source link

Can't install with pip [bug] #204

Closed wrc-wise closed 1 year ago

wrc-wise commented 2 years ago

Architecture

ARM_64 (64Bit)

Operating System

Mac OSX

Disk

NVME (M2, MSATA)

Memory

16 Gigabytes

CPU Cores

16 CPU Cores

Internet Connection

Optical Fiber (very fast)

What is your web browser?

Chrome/Chromium

Device

Desktop PC

Where are you from?

United Kingdom

What happened?

Can't pip install the module on either Python 3.8 or 3.9 on my 14 inch Macbook Pro. Seems like Nim support for ARM and macOS is limited.

Running M1 Pro chip with 16gb of Memory. MacOS version 12.6.

Attempted to install with both:

pip install faster_than_requests

and

pip install faster_than_requests --isolated --disable-pip-version-check --no-cache-dir --no-binary :all:

Logs included below:

Standard Output Logs

pip install faster_than_requests --isolated --disable-pip-version-check --no-cache-dir --no-binary :all:
Collecting faster_than_requests
  Downloading faster_than_requests-21.03.03.zip (4.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.9/4.9 MB 17.6 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [84 lines of output]
        error: subprocess-exited-with-error

        × python setup.py bdist_wheel did not run successfully.
        │ exit code: 1
        ╰─> [43 lines of output]
            running bdist_wheel
            running build
            installing to build/bdist.macosx-10.9-universal2/wheel
            running install
            running install_egg_info
            running egg_info
            writing choosenim_install.egg-info/PKG-INFO
            writing dependency_links to choosenim_install.egg-info/dependency_links.txt
            deleting choosenim_install.egg-info/requires.txt
            writing top-level names to choosenim_install.egg-info/top_level.txt
            writing manifest file 'choosenim_install.egg-info/SOURCES.txt'
            reading manifest file 'choosenim_install.egg-info/SOURCES.txt'
            writing manifest file 'choosenim_install.egg-info/SOURCES.txt'
            Copying choosenim_install.egg-info to build/bdist.macosx-10.9-universal2/wheel/choosenim_install-0.5.5-py3.9.egg-info
            running install_scripts
            /bin/sh: choosenim: command not found
            choosenim-init: Error: Sorry, your platform (macosx_arm) is not supported by choosenim.
            choosenim-init: Error: You will need to install Nim using an alternative method.
            choosenim-init: Error: See the following link for more info: https://nim-lang.org/install.html
            /private/var/folders/r9/7kdsqhcd2c7440brp74dnyt40000gn/T/pip-wheel-9gjzxxcy/choosenim-install_7fdff31c3a38469285b425963ddd7da1/setup.py:107: UserWarning: Failed to run sh init.sh -y
              warnings.warn("Failed to run " + choosenim_cmd)
            Traceback (most recent call last):
              File "<string>", line 2, in <module>
              File "<pip-setuptools-caller>", line 34, in <module>
              File "/private/var/folders/r9/7kdsqhcd2c7440brp74dnyt40000gn/T/pip-wheel-9gjzxxcy/choosenim-install_7fdff31c3a38469285b425963ddd7da1/setup.py", line 210, in <module>
                setuptools.setup(
              File "/Users/wise/PycharmProjects/sentiment-bot/venv/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
                return distutils.core.setup(**attrs)
              File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/distutils/core.py", line 148, in setup
                dist.run_commands()
              File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 966, in run_commands
                self.run_command(cmd)
              File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
                cmd_obj.run()
              File "/Users/wise/PycharmProjects/sentiment-bot/venv/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 335, in run
                self.run_command('install')
              File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 313, in run_command
                self.distribution.run_command(command)
              File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
                cmd_obj.run()
              File "/private/var/folders/r9/7kdsqhcd2c7440brp74dnyt40000gn/T/pip-wheel-9gjzxxcy/choosenim-install_7fdff31c3a38469285b425963ddd7da1/setup.py", line 208, in run
                raise Exception(IOError, "Failed to install choosenim")
            Exception: (<class 'OSError'>, 'Failed to install choosenim')
            [end of output]

        note: This error originates from a subprocess, and is likely not a problem with pip.
        ERROR: Failed building wheel for choosenim_install
      ERROR: Failed to build one or more wheels
      Traceback (most recent call last):
        File "/Users/wise/PycharmProjects/sentiment-bot/venv/lib/python3.9/site-packages/setuptools/installer.py", line 75, in fetch_build_egg
          subprocess.check_call(cmd)
        File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/subprocess.py", line 373, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['/Users/wise/PycharmProjects/sentiment-bot/venv/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/var/folders/r9/7kdsqhcd2c7440brp74dnyt40000gn/T/tmpijsheyw9', '--quiet', 'choosenim_install']' returned non-zero exit status 1.

      The above exception was the direct cause of the following exception:

      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/r9/7kdsqhcd2c7440brp74dnyt40000gn/T/pip-install-svzmel9l/faster-than-requests_dd66a5f0ba674937ac4dcc11b2371a1c/setup.py", line 2, in <module>
          setuptools.setup(package_data = {"": ["*.nim", "*.nims", "*.cfg", "*.dll", "*.so", "*.h", "*.hpp"]})
        File "/Users/wise/PycharmProjects/sentiment-bot/venv/lib/python3.9/site-packages/setuptools/__init__.py", line 152, in setup
          _install_setup_requires(attrs)
        File "/Users/wise/PycharmProjects/sentiment-bot/venv/lib/python3.9/site-packages/setuptools/__init__.py", line 147, in _install_setup_requires
          dist.fetch_build_eggs(dist.setup_requires)
        File "/Users/wise/PycharmProjects/sentiment-bot/venv/lib/python3.9/site-packages/setuptools/dist.py", line 779, in fetch_build_eggs
          resolved_dists = pkg_resources.working_set.resolve(
        File "/Users/wise/PycharmProjects/sentiment-bot/venv/lib/python3.9/site-packages/pkg_resources/__init__.py", line 766, in resolve
          dist = best[req.key] = env.best_match(
        File "/Users/wise/PycharmProjects/sentiment-bot/venv/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1051, in best_match
          return self.obtain(req, installer)
        File "/Users/wise/PycharmProjects/sentiment-bot/venv/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1063, in obtain
          return installer(requirement)
        File "/Users/wise/PycharmProjects/sentiment-bot/venv/lib/python3.9/site-packages/setuptools/dist.py", line 838, in fetch_build_egg
          return fetch_build_egg(self, req)
        File "/Users/wise/PycharmProjects/sentiment-bot/venv/lib/python3.9/site-packages/setuptools/installer.py", line 77, in fetch_build_egg
          raise DistutilsError(str(e)) from e
      distutils.errors.DistutilsError: Command '['/Users/wise/PycharmProjects/sentiment-bot/venv/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/var/folders/r9/7kdsqhcd2c7440brp74dnyt40000gn/T/tmpijsheyw9', '--quiet', 'choosenim_install']' returned non-zero exit status 1.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
github-actions[bot] commented 2 years ago

Welcome wrc-wise

BEP20 Binance Smart Chain Network BSC

0xb78c4cf63274bb22f83481986157d234105ac17e

BTC Bitcoin Network

1Pnf45MgGgY32X4KDNJbutnpx96E4FxqVi

Lightning Network

juancarlospaco@bitrefill.me

Ethereum ETH Dai DAI Uniswap UNI Axie Infinity AXS Smooth Love Potion SLP **BEP20 Binance Smart Chain Network BSC** ``` 0xb78c4cf63274bb22f83481986157d234105ac17e ``` **ERC20 Ethereum Network** ``` 0xb78c4cf63274bb22f83481986157d234105ac17e ```
Tether USDT **BEP20 Binance Smart Chain Network BSC** ``` 0xb78c4cf63274bb22f83481986157d234105ac17e ``` **ERC20 Ethereum Network** ``` 0xb78c4cf63274bb22f83481986157d234105ac17e ``` **TRC20 Tron Network** ``` TWGft53WgWvH2mnqR8ZUXq1GD8M4gZ4Yfu ```
Solana SOL **BEP20 Binance Smart Chain Network BSC** ``` 0xb78c4cf63274bb22f83481986157d234105ac17e ``` **SOL Solana Network** ``` FKaPSd8kTUpH7Q76d77toy1jjPGpZSxR4xbhQHyCMSGq ```
Cardano ADA **BEP20 Binance Smart Chain Network BSC** ``` 0xb78c4cf63274bb22f83481986157d234105ac17e ``` **ADA Cardano Network** ``` DdzFFzCqrht9Y1r4Yx7ouqG9yJNWeXFt69xavLdaeXdu4cQi2yXgNWagzh52o9k9YRh3ussHnBnDrg7v7W2hSXWXfBhbo2ooUKRFMieM ```
Sandbox SAND Decentraland MANA **ERC20 Ethereum Network** ``` 0xb78c4cf63274bb22f83481986157d234105ac17e ```
Algorand ALGO **ALGO Algorand Network** ``` WM54DHVZQIQDVTHMPOH6FEZ4U2AU3OBPGAFTHSCYWMFE7ETKCUUOYAW24Q ```
Binance [https://pay.binance.com/en/checkout/e92e536210fd4f62b426ea7ee65b49c3](https://pay.binance.com/en/checkout/e92e536210fd4f62b426ea7ee65b49c3 "Send via Binance Pay")
wrc-wise commented 2 years ago

Have also tried installing nim with the following commands (successfully) but has not changed the output on installing faster_than_requests.

git clone https://github.com/nim-lang/nim.git nim git clone -q --depth 1 https://github.com/nim-lang/csources_v1.git csources cd csources sh build.sh cp bin/nim ../nim/bin/nim cd ../nim bin/nim c --skipUserCfg --skipParentCfg koch ./koch boot -d:release --skipUserCfg --skipParentCfg

DiMiTriFrog commented 2 years ago

Isnt working in cent os x86 and mac os x86, same isue

TheGrandNobody commented 1 year ago

I got it to work.Go to https://github.com/dom96/choosenim, and install choosenim yourself, then install poetry through pip using: pip install poetry and finally you can install the rest with: pip install faster_than_requests

This worked for me using Mac OSX ARM64 (Sillicon chip) and python 3.10.8.

hadpro24 commented 1 year ago

Architecture

ARM_64 (64Bit)

Operating System

Mac OSX

Disk

NVME (M2, MSATA)

Memory

16 Gigabytes

CPU Cores

16 CPU Cores

Internet Connection

Optical Fiber (very fast)

What is your web browser?

Chrome/Chromium

Device

Desktop PC

Where are you from?

United Kingdom

What happened?

Can't pip install the module on either Python 3.8 or 3.9 on my 14 inch Macbook Pro. Seems like Nim support for ARM and macOS is limited.

Running M1 Pro chip with 16gb of Memory. MacOS version 12.6.

Attempted to install with both:

pip install faster_than_requests

and

pip install faster_than_requests --isolated --disable-pip-version-check --no-cache-dir --no-binary :all:

Logs included below:

Standard Output Logs

pip install faster_than_requests --isolated --disable-pip-version-check --no-cache-dir --no-binary :all:
Collecting faster_than_requests
  Downloading faster_than_requests-21.03.03.zip (4.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.9/4.9 MB 17.6 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [84 lines of output]
        error: subprocess-exited-with-error

        × python setup.py bdist_wheel did not run successfully.
        │ exit code: 1
        ╰─> [43 lines of output]
            running bdist_wheel
            running build
            installing to build/bdist.macosx-10.9-universal2/wheel
            running install
            running install_egg_info
            running egg_info
            writing choosenim_install.egg-info/PKG-INFO
            writing dependency_links to choosenim_install.egg-info/dependency_links.txt
            deleting choosenim_install.egg-info/requires.txt
            writing top-level names to choosenim_install.egg-info/top_level.txt
            writing manifest file 'choosenim_install.egg-info/SOURCES.txt'
            reading manifest file 'choosenim_install.egg-info/SOURCES.txt'
            writing manifest file 'choosenim_install.egg-info/SOURCES.txt'
            Copying choosenim_install.egg-info to build/bdist.macosx-10.9-universal2/wheel/choosenim_install-0.5.5-py3.9.egg-info
            running install_scripts
            /bin/sh: choosenim: command not found
            choosenim-init: Error: Sorry, your platform (macosx_arm) is not supported by choosenim.
            choosenim-init: Error: You will need to install Nim using an alternative method.
            choosenim-init: Error: See the following link for more info: https://nim-lang.org/install.html
            /private/var/folders/r9/7kdsqhcd2c7440brp74dnyt40000gn/T/pip-wheel-9gjzxxcy/choosenim-install_7fdff31c3a38469285b425963ddd7da1/setup.py:107: UserWarning: Failed to run sh init.sh -y
              warnings.warn("Failed to run " + choosenim_cmd)
            Traceback (most recent call last):
              File "<string>", line 2, in <module>
              File "<pip-setuptools-caller>", line 34, in <module>
              File "/private/var/folders/r9/7kdsqhcd2c7440brp74dnyt40000gn/T/pip-wheel-9gjzxxcy/choosenim-install_7fdff31c3a38469285b425963ddd7da1/setup.py", line 210, in <module>
                setuptools.setup(
              File "/Users/wise/PycharmProjects/sentiment-bot/venv/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
                return distutils.core.setup(**attrs)
              File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/distutils/core.py", line 148, in setup
                dist.run_commands()
              File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 966, in run_commands
                self.run_command(cmd)
              File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
                cmd_obj.run()
              File "/Users/wise/PycharmProjects/sentiment-bot/venv/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 335, in run
                self.run_command('install')
              File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 313, in run_command
                self.distribution.run_command(command)
              File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
                cmd_obj.run()
              File "/private/var/folders/r9/7kdsqhcd2c7440brp74dnyt40000gn/T/pip-wheel-9gjzxxcy/choosenim-install_7fdff31c3a38469285b425963ddd7da1/setup.py", line 208, in run
                raise Exception(IOError, "Failed to install choosenim")
            Exception: (<class 'OSError'>, 'Failed to install choosenim')
            [end of output]

        note: This error originates from a subprocess, and is likely not a problem with pip.
        ERROR: Failed building wheel for choosenim_install
      ERROR: Failed to build one or more wheels
      Traceback (most recent call last):
        File "/Users/wise/PycharmProjects/sentiment-bot/venv/lib/python3.9/site-packages/setuptools/installer.py", line 75, in fetch_build_egg
          subprocess.check_call(cmd)
        File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/subprocess.py", line 373, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['/Users/wise/PycharmProjects/sentiment-bot/venv/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/var/folders/r9/7kdsqhcd2c7440brp74dnyt40000gn/T/tmpijsheyw9', '--quiet', 'choosenim_install']' returned non-zero exit status 1.

      The above exception was the direct cause of the following exception:

      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/r9/7kdsqhcd2c7440brp74dnyt40000gn/T/pip-install-svzmel9l/faster-than-requests_dd66a5f0ba674937ac4dcc11b2371a1c/setup.py", line 2, in <module>
          setuptools.setup(package_data = {"": ["*.nim", "*.nims", "*.cfg", "*.dll", "*.so", "*.h", "*.hpp"]})
        File "/Users/wise/PycharmProjects/sentiment-bot/venv/lib/python3.9/site-packages/setuptools/__init__.py", line 152, in setup
          _install_setup_requires(attrs)
        File "/Users/wise/PycharmProjects/sentiment-bot/venv/lib/python3.9/site-packages/setuptools/__init__.py", line 147, in _install_setup_requires
          dist.fetch_build_eggs(dist.setup_requires)
        File "/Users/wise/PycharmProjects/sentiment-bot/venv/lib/python3.9/site-packages/setuptools/dist.py", line 779, in fetch_build_eggs
          resolved_dists = pkg_resources.working_set.resolve(
        File "/Users/wise/PycharmProjects/sentiment-bot/venv/lib/python3.9/site-packages/pkg_resources/__init__.py", line 766, in resolve
          dist = best[req.key] = env.best_match(
        File "/Users/wise/PycharmProjects/sentiment-bot/venv/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1051, in best_match
          return self.obtain(req, installer)
        File "/Users/wise/PycharmProjects/sentiment-bot/venv/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1063, in obtain
          return installer(requirement)
        File "/Users/wise/PycharmProjects/sentiment-bot/venv/lib/python3.9/site-packages/setuptools/dist.py", line 838, in fetch_build_egg
          return fetch_build_egg(self, req)
        File "/Users/wise/PycharmProjects/sentiment-bot/venv/lib/python3.9/site-packages/setuptools/installer.py", line 77, in fetch_build_egg
          raise DistutilsError(str(e)) from e
      distutils.errors.DistutilsError: Command '['/Users/wise/PycharmProjects/sentiment-bot/venv/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/var/folders/r9/7kdsqhcd2c7440brp74dnyt40000gn/T/tmpijsheyw9', '--quiet', 'choosenim_install']' returned non-zero exit status 1.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

I have the same issue

juancarlospaco commented 1 year ago

At some point you are right, I do not have a Mac to debug, I tried some "Hackintosh" but never got it to work sadly, I tried debug on the CI but is very complicated and limited, so unless someone can donate an old Mac, I can not fix it easily.

DiMiTriFrog commented 1 year ago

Now its working, but cant install on aws linux 2...

matt9959 commented 1 year ago

pip "install nimporter" and "pip install choosenim_install" should fix it

github-actions[bot] commented 1 year ago

This issue is Stale because it has been open for 100 days with no activity. Contribute a fix or comment on the issue, or it will be closed in a few days.

github-actions[bot] commented 1 year ago

This issue has been marked as Stale and closed due to inactivity after 100 days.