EX46: "mkdir: illegal option -- /" - stuck at setup with Mac

Hello,

I’m working on the EX46 exercise, but I am getting stuck on the very first part of the setup. I am on a Mac, and while I can install the virtualenv, I end up in trouble when I go further in the steps. When I do:

mkdir -/.venvs it returns:
mkdir: illegal option – /
usage: mkdir [-pv] [-m mode] directory …

Obviously, the other steps fail as well after that, as expected. I’ve tried Googling for the error, and checking help on virtualenv, but can’t quite seem to find something similar that gives any ideas of what the problem is caused by. Has anyone encountered this before?

Thank you in advance,
S

Are you really typing mkdir -/.venvs? I’m not on a Mac, but I think hyphens are used to specify options on all Unix-like systems. Can you try the tilde instead? mkdir ~/.venvs

1 Like

@florian is correct. It’s a tilder’~’ not hyphen. And tilder and forward-slash together means current user directory so you don’t have to type out your username in the path.

For example: to access my project directory where LPTHW files sit:

~/projects/LPTHW
1 Like

Big thanks @florian and @gpkesley! I managed to get it to work now.

1 Like

Hi, @Sjuchov, the mistake is in this:

mkdir -/.venvs

You are using a dash (-) character but it should be a tilde (~) character like this:

mkdir ~/.venvs

I’m not sure where that is on your keyboard, but it should be available. It’s frequently used in the Spanish languages.