Tech Tips

6 posts

Fix broken pipenv in a virtual environment (could not find a version that matches X)

I’d messed up my pipenv previously by trying to get it to install a module that just wasn’t working out for me. In using pipenv install -skip-lock I’d inadvertently put my pipenv in a state where it was constantly stuck in a loop where it was trying to install “blocks” through pipenv which just wasn’t possible.

This is what my error log looked like in terminal:

[pipenv.exceptions.ResolutionFailure]: No versions found
[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
First try clearing your dependency cache with $ pipenv lock –clear, then try the original command again.
Alternatively, you can use $ pipenv install –skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
Hint: try $ pipenv lock –pre if it is a pre-release dependency.
ERROR: ERROR: Could not find a version that matches blocks
No versions found
Was https://pypi.org/simple reachable?

To fix the problem, I ended up deleting my pipfile and running the same install command again. It installed the package I was trying to get (elasticsearch) and updated Pipfile.lock with the new project requirements.

Note: Your pipfile will look something like this in your project folder.

My terminal output after deleting the pipfile in my virtual environment:

(venv) Nicholass-MacBook-Pro:microblog nicholaspezarro$ pipenv install elasticsearch
Creating a Pipfile for this project…
Installing elasticsearch…
Adding elasticsearch to Pipfile’s [packages]…
✔ Installation Succeeded
Pipfile.lock (0b8641) out of date, updating to (9d3b63)…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
✔ Success!
Updated Pipfile.lock (0b8641)!
Installing dependencies from Pipfile.lock (0b8641)…
🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 2/2 — 00:00:00

readlink: command not found

I’ve been working on a bunch of projects that involve Python and a decent amount of commands written and issued in terminal. At one point, I was trying to boot up a local server for a web app I was running and kept running into the error “readlink: command not found”. After a ton of searching and attempting to understand what was going on, I was able to find a solution that solved my problem and allowed me to get back on track.

The core of this issue is changes made to your .bash_profile that renders it unreadable or unparseable so you need to jolt it out of that state to allow it to function normally again.

The answer here on Stackoverflow ultimately led to me solving my problem.

It is happens when you just copy the line (below) into the .bash_profile without removing the quotes (‘xxxx’)
export PATH=’/usr/local/bin:$PATH’

To resolve, just run in console:
export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin

Then, edit again the file removing the quotes:
vim ~/.bash_profile

The terminal commands that I ran locally ended up looking like this

Nicholass-MacBook-Pro:post-covid-19 nicholaspezarro$ export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin
Nicholass-MacBook-Pro:post-covid-19 nicholaspezarro$ source ~/.bash_profile

Hopefully this helps you out if you’re having this issue!

Creating a .slate file for Slate (Mac Window Management): Resolve “Could not load ~/.slate or ~/.slate.js”

A while back I was looking for a solution to restore my window setup when I went between being at my desk and bringing my laptop to meetings. I settled on Slate which is a great, lightweight solution to save your window positions and quickly restore them exactly as they were. Unfortunately, it can be a bit tricky at times to setup as you need to create a .slate file in your Home directory which is not something you can easily in Finder or even with a text editor like Sublime.

If you don’t have your file set up you’ll keep getting this error:


The dreaded “Could not load ~/.slate or ~/.slate.js”

Thankfully, it is very simple to resolve using Terminal. Just follow these steps.

Open Terminal and type (or paste in) the following commands:
cd $HOME
touch .slate
open -a textedit .slate

At this point, you’ll see a textEdit window pop up with .slate as the title. Save that file and you’re set!

Now, when you save your window positions in Slate (Take Snapshot) they’ll be stored for your next session and you can easily restore them (Activate Snapshot)

Big thank you to harzivi for their helpful suggestion on Github!

Comparison of Major Internet Providers in the Bay Area (Primarily San Francisco)

Tier Breakdown

NameTier LevelSpeedCostReliabilityAdditional Notes
Sonic (Fiber)A1000 up/down$40/moExcellentNo annual contract
WebpassA1000 up/down$60/month or $550/year ($45/month)ExcellentChoice between annual or monthly contract
Monkeybrains (if in the right service area)AExcellent$105/3 months ($35/month)GoodNo annual contract, pay in 3 month increments, no modem required
Wave BroadbandB1000 up/down$62/month (12 month plan, doubles at end of term), may be able to reduce monthly cost by providing own modemGoodLooks like recently service and pricing may have become significantly worse. I had a good experience with them back in 2015/16 though.
ComcastB150 down$60/monthGoodMake sure you use your own modem or they’ll charge you a fee. Avoid the TV bundle as it includes a $8 fee that gets tacked on
AT&TC1000 down90/month (plus taxes)Good 
Sonic (Non-Fiber)C15MBps down50/monthGoodForced to take a home phone as part of your service
Race CommunicationsCircumstantial1000 up/down$60/moUnknown 
PAXIOCircumstantial1000 up/down$99.50/moUnknown 

 

Gallery of all screenshots

Sources

This site is kind of awful but sort of useful for getting a sense of what is available out there at a glance.

Official Google Adwords Coupon Link

Just want a code? Go here.

If you want to get an introductory offer for the Adwords account you’re setting up you’ll see a bunch of results from random blogs claiming to have coupon codes that give you a certain amount of credit but inevitably those codes don’t work because they’ve been used, are expired or the author is lying. The only way to reliably get an intro offer is to go to Google themselves and get a promo code from them. This was surprisingly difficult information to find so I’ve brought it together here to benefit you, :)!

The current offer is to get a $75 credit once you’ve spent $25 on Adwords (which is much better than a $0 credit once you’ve spent $25 on Adwords, :P). Make sure that your budget is 10$/day or more otherwise you won’t qualify for the credit (I got burned by this, 🙁 )!

You can find the Google offer here.

I’ve also included the page in an iFrame below if you’re lazy and don’t want to navigate to the site, :).

Important note: You can’t make use of this coupon if you’re using an account that was already signed up with Adwords so make sure that that you use a new email address to sign up for this. There are many folks posting on forums and the like complaining about having used the coupon and it not applying (since they weren’t applying it to a fresh account).

Once you provide your email and generate the offer you’ll get an email like this containing your coupon code, :).

Terms and conditions of Offer (for anyone interested)

How to Get Netflix on the Razer Forge TV

“If you’re like me and you got a Razer Forge TV but were dismayed by the lack of Netflix you’ll be happy to hear that it is in fact possible to get it working on your Razer Forge TV despite the launch and support of the device being completely fumbled and the product outright discontinued (apparently the Forge TV has not been discontinued despite many signs seemingly pointing to that fate).

You have two choices, download from the link that I’ve uploaded the APK file to, or from the APK mirror place that I got it from in the first place.

Obtaining the file

  • Getting it from the link I’ve uploaded it to
    • Open  your default web browser app.
    • Type in: “”goo.gl/VqhHAX””
    • Click on the link to download the APK from the link that you’ve been navigated to should be (http://s000.tinyupload.com/index.php?file_id=98549926711484639747).
    • Install Netflix!
  • Getting it from the mirror site
    • Download the app ES File Manager through the Google Store on your Razer Forge TV.
    • Navigate to favourites and go to Google.
    • Search APK Mirror
    • Select the first search result, apkmirror.com
    • Navigate two presses to the right and hit the select button on your remote.
    • Search for Netflix
    • Scroll down and select Netflix 3.16 Build 5294.
    • Navigate down until you see a box around the Google Play store icon and then navigate one to the right. Hit the select button to start your download. Once it’s downloaded go ahead and install.

Once you’ve finished your install you’ll have to go to Settings > Apps and then select Netflix there to open it.

Enjoy using Netflix on your Razer Forge TV device.

This article was inspired by instructions from MaterializeBD’s Youtube video here.

That’s all for now. Have a pezant day!

Note: If you liked this article. Consider donating or installing this Chrome Extension I made that gives me credit for your Amazon purchases (by adding in my referral tag when you’re browsing Amazon).

[sdonations]1[/sdonations]”