opentensor / developer-docs

Developer documentation for Bittensor.
https://docs.bittensor.com
21 stars 22 forks source link

Docs Bug or Enhancement or Suggestion (Edit this before submitting) #398

Open airmarshal90 opened 1 day ago

airmarshal90 commented 1 day ago

Please follow below guidelines while creating the issue.

  1. Is this a bug, or an enhancement, or a suggestion for a new doc section?
  2. Describe the issue in detail. More details will help address the issue better.
  3. Add links to the doc pages for which you are submitting this Issue.
airmarshal90 commented 1 day ago

hello this code doest work for installing bittensor kindly help. it wont install in my mac os .

this is the code /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/opentensor/bittensor/master/scripts/install.sh)"

the link for reference is https://github.com/opentensor/developer-docs/blob/main/docs/getting-started/installation.md

rajkaramchedu commented 1 day ago

Hey @airmarshal90, what error message do you get? Can you post the complete terminal log here?

airmarshal90 commented 1 day ago

yes @rajkaramchedu i can. this is the terminal log i see on my mac book bash terminal

Press RETURN to continue or any other key to abort ==> Installing brew: curl: (56) The requested URL returned error: 404 ==> Installing cmake: /bin/bash: line 141: brew: command not found ==> Installing python3 /bin/bash: line 151: brew: command not found ==> Updating python3 /bin/bash: line 153: brew: command not found "" command failed with exit code 127.

rajkaramchedu commented 1 day ago

What is your macOS version? Can you run "sw_vers" on your command line and paste here the output you get?

airmarshal90 commented 1 day ago

i just updated my mac os. a minute ago. but i will give you the output right now.

ProductName: macOS ProductVersion: 15.1 BuildVersion: 24B83

rajkaramchedu commented 1 day ago

Thanks! It looks like this script is broken. Lord knows how long this was sitting in the repo like this. Ignore this method for now. Can you follow these steps and install? https://docs.bittensor.com/getting-started/installation#install-python-virtual-environment

airmarshal90 commented 1 day ago

ok i will try it thanks and get back to you so i cant use the bash line code?

rajkaramchedu commented 1 day ago

ok i will try it thanks and get back to you so i cant use the bash line code?

For now don't use the bash line code. It needs fixing. One of us will get to it in a few days, but this is not a super high priority for us right now, too many ongoing higher priorities.

airmarshal90 commented 1 day ago

Okay thanks I will try the other procedure and get back to you thanks Sent from my iPhoneOn Oct 30, 2024, at 12:36 AM, Watchmaker @.***> wrote:

ok i will try it thanks and get back to you so i cant use the bash line code?

For now don't use the bash line code. It needs fixing. One of us will get to it in a few days, but this is not a super high priority for us right now, too many ongoing higher priorities.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

airmarshal90 commented 11 hours ago

hello it still has an error code again . says command not found the install from source doesnt also work correctly

rajkaramchedu commented 9 hours ago

hello it still has an error code again . says command not found the install from source doesnt also work correctly

I see. I think it is best if you post this in the General channel of Bittensor Discord here https://discord.com/channels/799672011265015819/799672011814862902. You can add a link to this Issue. Someone will walk you through the steps. I think it could be something simple as setting PATH variable correctly.

galina-opentensor commented 9 hours ago

@airmarshal90 The terminal log suggests that Homebrew (the macOS package manager) isn't installed or isn't accessible in your terminal. The errors you're seeing occur because the script tries to use brew, but the command isn't recognized, which results in the error command not found. Additionally, the curl: (56) The requested URL returned error: 404 message indicates that it couldn’t retrieve Homebrew's installation script.

Please try to run the following command to install Homebrew manually:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

This command downloads and runs the official installation script for Homebrew. Follow the on-screen instructions, and it should set up Homebrew properly.

After installation, you may need to add Homebrew to your shell’s PATH so that it can be accessed from the terminal. Add the following lines to your shell profile file (e.g., ~/.bash_profile or ~/.zshrc):

echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.bash_profile
source ~/.bash_profile

After installation, confirm that Homebrew is working by running:

brew --version

Retry running the original script:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/opentensor/bittensor/master/scripts/install.sh)"
airmarshal90 commented 9 hours ago

it installed thanks

airmarshal90 commented 8 hours ago

hello to second process posses another error when i try to install BTCLI

Processing /Users/mudiz/btcli Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting wheel (from bittensor-cli==8.2.0) Using cached wheel-0.44.0-py3-none-any.whl.metadata (2.3 kB) Collecting async-property==0.2.2 (from bittensor-cli==8.2.0) Using cached async_property-0.2.2-py2.py3-none-any.whl.metadata (5.3 kB) Collecting aiohttp~=3.10.2 (from bittensor-cli==8.2.0) Using cached aiohttp-3.10.10-cp313-cp313-macosx_10_13_x86_64.whl.metadata (7.6 kB) Collecting backoff~=2.2.1 (from bittensor-cli==8.2.0) Using cached backoff-2.2.1-py3-none-any.whl.metadata (14 kB) Collecting GitPython>=3.0.0 (from bittensor-cli==8.2.0) Using cached GitPython-3.1.43-py3-none-any.whl.metadata (13 kB) Collecting fuzzywuzzy~=0.18.0 (from bittensor-cli==8.2.0) Using cached fuzzywuzzy-0.18.0-py2.py3-none-any.whl.metadata (4.9 kB) Collecting netaddr~=1.3.0 (from bittensor-cli==8.2.0) Using cached netaddr-1.3.0-py3-none-any.whl.metadata (5.0 kB) Collecting numpy>=2.0.1 (from bittensor-cli==8.2.0) Using cached numpy-2.1.2-cp313-cp313-macosx_14_0_x86_64.whl.metadata (60 kB) Collecting Jinja2 (from bittensor-cli==8.2.0) Using cached jinja2-3.1.4-py3-none-any.whl.metadata (2.6 kB) Collecting pycryptodome (from bittensor-cli==8.2.0) Using cached pycryptodome-3.21.0-cp36-abi3-macosx_10_9_x86_64.whl.metadata (3.4 kB) Collecting PyYAML~=6.0.1 (from bittensor-cli==8.2.0) Using cached PyYAML-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl.metadata (2.1 kB) Collecting pytest (from bittensor-cli==8.2.0) Using cached pytest-8.3.3-py3-none-any.whl.metadata (7.5 kB) Collecting python-Levenshtein (from bittensor-cli==8.2.0) Using cached python_Levenshtein-0.26.1-py3-none-any.whl.metadata (3.7 kB) Collecting rich~=13.7 (from bittensor-cli==8.2.0) Using cached rich-13.9.3-py3-none-any.whl.metadata (18 kB) Collecting scalecodec==1.2.11 (from bittensor-cli==8.2.0) Using cached scalecodec-1.2.11-py3-none-any.whl.metadata (17 kB) Collecting substrate-interface~=1.7.9 (from bittensor-cli==8.2.0) Using cached substrate_interface-1.7.11-py3-none-any.whl.metadata (4.5 kB) Collecting typer~=0.12 (from bittensor-cli==8.2.0) Using cached typer-0.12.5-py3-none-any.whl.metadata (15 kB) Collecting websockets>=12.0 (from bittensor-cli==8.2.0) Using cached websockets-13.1-cp313-cp313-macosx_10_13_x86_64.whl.metadata (6.8 kB) Collecting bittensor-wallet>=2.0.2 (from bittensor-cli==8.2.0) Using cached bittensor_wallet-2.0.2.tar.gz (69 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [6 lines of output]

  Cargo, the Rust package manager, is not installed or is not on PATH.
  This package requires Rust and Cargo to compile extensions. Install it through
  the system's package manager or via https://rustup.rs/

  Checking for Rust toolchain....
  [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.

rajkaramchedu commented 8 hours ago

The above error says exactly what the problem is. "cargo" is not in your PATH. Type "which cargo" and if it comes back saying "cargo not found" then it is not in your PATH. Do you see "cargo" in /Users/mudiz/.cargo/bin directory? If yes, then add this directory to your PATH variable. Then do "which cargo" one more time and it should now show you the "cargo" path. Then run the btcli install again.

galina-opentensor commented 8 hours ago

@airmarshal90

The error message indicates that the package you're trying to install requires Rust (and its package manager, Cargo) to compile extensions, but they’re either not installed or aren’t in your PATH. Rust is needed here because the package includes components written in Rust that need to be built during installation.

Install Rust and Cargo:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

This script will guide you through the installation. Once installed, Rust and Cargo should be added to your PATH.

Verify the Installation:

rustc --version
cargo --version
airmarshal90 commented 8 hours ago

okay @galina-opentensor rust installed but not cargo and it gave me a code to install it but it didnt work for the cargo

below is the error

(btcli_venv) Mudiss-MacBook-Pro:btcli mudiz$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh info: downloading installer

Welcome to Rust!

This will download and install the official compiler for the Rust programming language, and its package manager, Cargo.

Rustup metadata and toolchains will be installed into the Rustup home directory, located at:

/Users/mudiz/.rustup

This can be modified with the RUSTUP_HOME environment variable.

The Cargo home directory is located at:

/Users/mudiz/.cargo

This can be modified with the CARGO_HOME environment variable.

The cargo, rustc, rustup and other commands will be added to Cargo's bin directory, located at:

/Users/mudiz/.cargo/bin

This path will then be added to your PATH environment variable by modifying the profile files located at:

/Users/mudiz/.profile /Users/mudiz/.bash_profile /Users/mudiz/.zshenv

You can uninstall at any time with rustup self uninstall and these changes will be reverted.

Current installation options:

default host triple: x86_64-apple-darwin default toolchain: stable (default) profile: default modify PATH variable: yes

1) Proceed with standard installation (default - just press enter) 2) Customize installation 3) Cancel installation

info: profile set to 'default' info: default host triple is x86_64-apple-darwin info: syncing channel updates for 'stable-x86_64-apple-darwin' info: latest update on 2024-10-17, rust version 1.82.0 (f6e511eec 2024-10-15) info: downloading component 'cargo' info: downloading component 'clippy' info: downloading component 'rust-docs' 16.3 MiB / 16.3 MiB (100 %) 10.4 MiB/s in 1s ETA: 0s info: downloading component 'rust-std' 24.9 MiB / 24.9 MiB (100 %) 10.0 MiB/s in 2s ETA: 0s info: downloading component 'rustc' 59.6 MiB / 59.6 MiB (100 %) 10.8 MiB/s in 5s ETA: 0s info: downloading component 'rustfmt' info: installing component 'cargo' info: installing component 'clippy' info: installing component 'rust-docs' 16.3 MiB / 16.3 MiB (100 %) 2.6 MiB/s in 5s ETA: 0s info: installing component 'rust-std' 24.9 MiB / 24.9 MiB (100 %) 8.2 MiB/s in 2s ETA: 0s info: installing component 'rustc' 59.6 MiB / 59.6 MiB (100 %) 11.0 MiB/s in 5s ETA: 0s info: installing component 'rustfmt' info: default toolchain set to 'stable-x86_64-apple-darwin'

stable-x86_64-apple-darwin installed - rustc 1.82.0 (f6e511eec 2024-10-15)

Rust is installed now. Great!

To get started you may need to restart your current shell. This would reload your PATH environment variable to include Cargo's bin directory ($HOME/.cargo/bin).

To configure your current shell, you need to source the corresponding env file under $HOME/.cargo.

This is usually done by running one of the following (note the leading DOT): . "$HOME/.cargo/env" # For sh/bash/zsh/ash/dash/pdksh source "$HOME/.cargo/env.fish" # For fish (btcli_venv) Mudiss-MacBook-Pro:btcli mudiz$ . "$HOME/.cargo/env" # For sh/bash/zsh/ash/dash/pdksh (btcli_venv) Mudiss-MacBook-Pro:btcli mudiz$ source "$HOME/.cargo/env.fish" # For fish -bash: /Users/mudiz/.cargo/env.fish: No such file or directory (btcli_venv) Mudiss-MacBook-Pro:btcli mudiz$ . "$HOME/.cargo/env" (btcli_venv) Mudiss-MacBook-Pro:btcli mudiz$ # For sh/bash/zsh/ash/dash/pdksh (btcli_venv) Mudiss-MacBook-Pro:btcli mudiz$ # For sh/bash/zsh/ash/dash/pdksh (btcli_venv) Mudiss-MacBook-Pro:btcli mudiz$ source "$HOME/.cargo/env.fish" # For fish -bash: /Users/mudiz/.cargo/env.fish: No such file or directory (btcli_venv) Mudiss-MacBook-Pro:btcli mudiz$ "$HOME/.cargo/env"
-bash: /Users/mudiz/.cargo/env: Permission denied (btcli_venv) Mudiss-MacBook-Pro:btcli mudiz$ . "$HOME/.cargo/env" (btcli_venv) Mudiss-MacBook-Pro:btcli mudiz$ sh/bash/zsh/ash/dash/pdksh -bash: sh/bash/zsh/ash/dash/pdksh: No such file or directory (btcli_venv) Mudiss-MacBook-Pro:btcli mudiz$

galina-opentensor commented 8 hours ago

Run this command to add Cargo to your session’s PATH

. "$HOME/.cargo/env"

Verify Installation:

cargo --version

If cargo --version doesn’t work right away, try restarting your terminal to refresh the environment settings.

airmarshal90 commented 8 hours ago

done all good nowthanks

airmarshal90 commented 8 hours ago

am sorry new to all of this , whats the code to restart terminal

galina-opentensor commented 8 hours ago

Simply close your terminal window and open a new one. This will start a fresh session with the updated environment.

airmarshal90 commented 7 hours ago

okay now that i have installed them both i am trying to install the wallet sdk ? since i have installed the Bittensor SDK and BTCLI does it mean the wallet sdk is already pre installed?

because i tried installing the sdk wallet and it couldnt run

galina-opentensor commented 7 hours ago

Yes, you can use pip list

pip list | grep bittensor
galina-opentensor commented 7 hours ago

If you’re seeing “pip command not found,” it usually means pip isn’t in your PATH, or Python may not be fully set up. Try running pip through Python directly:

python3 -m pip list

Ensure Python and Pip are installed by running:

python3 --version
python3 -m pip --version
airmarshal90 commented 7 hours ago

i think i have to always activate the python virtual environment everytime before i time the code

airmarshal90 commented 7 hours ago

thanks tomorrow id try create a wallet good day