Bitcoin Forum
November 02, 2024, 10:56:03 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Troubleshooting Assistance with Programming Bitcoin by Jimmy Song (Setting Up)  (Read 126 times)
bitcoinbull2020 (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
April 24, 2022, 01:21:23 AM
 #1

Hello everyone,

I have been researching and investing in Bitcoin the last 3 years, but have more recently been interested in learning programming for Bitcoin.  I recently bought Jimmy Song's book, Programming Bitcoin: Learn How to Program Bitcoin from Scratch.

I am working on installing all the necessary programs and environment to do the exercises for the book (as listed on pages xv and xvi in the preface). I copied and pasted the code as listed in the book and on the github website:

https://github.com/jimmysong/programmingbitcoin


I was able to successfully complete steps 1-6 on my MacOs, but when I tried to do step 7, I got the following in my Terminal:

Andrews-MacBook-Air:~ andrew$ pip install virtualenv --user
Requirement already satisfied: virtualenv in ./Library/Python/3.6/lib/python/site-packages (20.14.1)
Requirement already satisfied: importlib-metadata>=0.12 in ./Library/Python/3.6/lib/python/site-packages (from virtualenv) (4.8.3)
Requirement already satisfied: filelock<4,>=3.2 in ./Library/Python/3.6/lib/python/site-packages (from virtualenv) (3.4.1)
Requirement already satisfied: distlib<1,>=0.3.1 in ./Library/Python/3.6/lib/python/site-packages (from virtualenv) (0.3.4)
Requirement already satisfied: importlib-resources>=1.0 in ./Library/Python/3.6/lib/python/site-packages (from virtualenv) (5.4.0)
Requirement already satisfied: platformdirs<3,>=2 in ./Library/Python/3.6/lib/python/site-packages (from virtualenv) (2.4.0)
Requirement already satisfied: six<2,>=1.9.0 in ./Library/Python/3.6/lib/python/site-packages (from virtualenv) (1.16.0)
Requirement already satisfied: typing-extensions>=3.6.4 in ./Library/Python/3.6/lib/python/site-packages (from importlib-metadata>=0.12->virtualenv) (4.1.1)
Requirement already satisfied: zipp>=0.5 in ./Library/Python/3.6/lib/python/site-packages (from importlib-metadata>=0.12->virtualenv) (3.6.0)
Andrews-MacBook-Air:~ andrew$ virtualenv -p python3 .venv
-bash: virtualenv: command not found
Andrews-MacBook-Air:~ andrew$

I don't know much about programming and would appreciate any feedback for troubleshooting with this so I can progress through the rest of the book. I searched on my web browser and youtube, but didn't find any troubleshooting advice specific to this problem.

I primarily need help with steps 7 and 8 for setting up my laptop to do the chapters and assignments. Any assistance is greatly appreciated.


jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
April 24, 2022, 02:07:24 AM
Last edit: April 24, 2022, 02:26:32 AM by jackg
 #2

Edit: looking back at it once more could you run "python -m virtualenv" and see what that does? I think I remember esolving a problem similar to this on Debian by writing it that way instead.

I wrote a solution too quickly and it was just suggesting you do step 6.

Could you run pip install venv and use that instead of virtualenv (according to stackoverflow it should be built into python 3)? That can be used and activated the same way I think.
bitcoinbull2020 (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
April 24, 2022, 02:53:27 AM
 #3

Thanks for the assistance and suggestions.  I tried to install it as: pip install venv (as you suggested) and got the following:

ERROR: Could not find a version that satisfies the requirement venv (from versions: none)
ERROR: No matching distribution found for venv

jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
April 24, 2022, 08:10:54 PM
 #4

Thanks for the assistance and suggestions.  I tried to install it as: pip install venv (as you suggested) and got the following:

ERROR: Could not find a version that satisfies the requirement venv (from versions: none)
ERROR: No matching distribution found for venv



It's because it already comes with python.

You just need to run python - m venv .venv and follow the rest of the instructions.
bitcoinbull2020 (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
April 25, 2022, 06:55:16 PM
 #5

thanks for your help.  I am going to do some more research with virtualenv for python to get a better grasp of the basic concepts.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!