v3.0
Official Packages
Masonite Essentials
Powered By GitBook
Known Installation Issues

Introduction

There are no known Masonite specific issues known and if there are then there should be an issue open for them on GitHub. With that being said, some users may experience some difficulties with installing Masonite simply because their computer environment is not the norm, they have never setup Python and may have configured it incorrectly or they have not used Python in a while and have an old version.
Before you get started reading through this FAQ make sure you have:
    Python 3.4+
    Pip3
Ensure you are installing masonite-cli with pip3 and not pip.

I ran pip install masonite-cli but it gave me a permission error?

You are likely running this command on a UNIX based machine like Mac or Linux. In that case you should either run it again with a sudo command or a user command flag:
1
$ pip install masonite-cli --user
Copied!
or
1
$ pip install --user masonite-cli
Copied!

I pip installed masonite-cli but running craft doesn't work?

If you ran:
1
$ pip install masonite-cli --user
Copied!
and then run:
1
$ python craft
Copied!
and get something like:
1
-bash: craft: command not found
Copied!
then try closing your terminal and reopening it. If that doesn't work then you may be running a pip version connecting to Python 2.7. Try uninstalling it and reinstalling it using pip3:
1
$ pip uninstall masonite-cli
2
$ pip3 install masonite-cli
Copied!
If that does not work then you may have to run sudo:
1
$ pip3 uninstall masonite-cli
2
$ sudo pip3 install masonite-cli
Copied!

I'm getting this weird ModuleNotFound idna issue when running the craft new command

You may get a strange error like:
1
pkg_resources.DistributionNotFound: The 'idna<2.7,>=2.5' distribution was not found and is required by requests
Copied!
The simple fix may just be to run:
1
pip install --upgrade requests
Copied!
If that doesn't work we can just go back to the lower idna version:
1
pip install idna==2.6
Copied!
If that does not fix the issue then continue reading.
If the above fix did not work then this likely means you installed masonite-cli using the Python 2.7 pip command. Out of the box, all Mac and Linux based machines have Python 2.7. If you run:
1
$ python --version
Copied!
you should get a return value of:
1
Python 2.7.14
Copied!
But if you run:
1
$ python3 --version
Copied!
you should get a return value of:
1
Python 3.6.5
Copied!
Now pip commands are similar:
1
$ pip --version
2
pip 10.0.1 /location/of/installation (python 2.7)
3
4
$ pip3 --version
5
pip 10.0.1 /location/of/installation (python 3.6)
Copied!
Notice here we are using 2 different Python installations.
So if you are getting this error you should uninstall masonite-cli from pip and reinstall it using pip3:
1
$ pip uninstall masonite-cli
2
$ pip3 install masonite-cli
Copied!
You may have to run sudo to remove and install it and you may need to close your terminal to get it work if you are using a UNIX machine.

I installed masonite-cli successfully but the craft command is not showing up

If you installed everything successfully and running:
1
$ python craft
Copied!
Shows an error that it can't be found then try closing your terminal and opening it again. This should refresh any commands that were recently installed
If you still have errors and on a UNIX based machine try running:
1
$ sudo pip3 install masonite-cli
Copied!

I'm getting a module urlib has no attribute urlopen

You likely ran:
1
$ python craft new project_name
Copied!
and hit this weird snag that throws this ambiguous error. You might think this is because of a Python version issue but craft is designed to work on Python 2.7 and 3.4+ (although 2.7 and not thoroughly tested) and you're years of Python experience would make you right but this is special. If you are getting this error then that means you are likely on a UNIX machine, Mac right?
The problem is that your machine does not have sufficient permissions to access these external calls from the command line because your machine does not have permission to do so. You will have to give you machine the command to do so by running:
1
$ /Applications/Python\ 3.6/Install\ Certificates.command
Copied!
or whatever your Python 3 version is in the middle. Now try running:
1
$ python craft new project_name
Copied!
and it should work great!
Last modified 8mo ago