0

I’ve been trying to follow the python3+libtcod roguelike Tutorial online but I’m stuck on the first hurdle.

As soon as I try to import “libtcodpy” to python I get a “Access denied” from my terminal.

I tried running in administrator already and access was denied, I also restarted the computer, and I checked the security and it claims that all users on the computer have full access to python and to the file where I unzipped libtcod.

Anyone know how to solve this issue? And is this likely to be an issue in the future or is it just with libtcod?

What can I do in future to avoid getting an “access denied” when installing other libraries for python?

I’m using windows 10 with the latest versions of python and the latest version of libtcod.

1 Answers1

0

Try running CMD or Powershell (terminal) as admin. That should allow you to install packages to the system.

To avoid this mess, I'd recommend setting up a virtual environment such as Anaconda or Virtualenv and using those to "host" your projects.

More about anaconda here

  • Thanks for your reply. I tried already trying cmd as admin and navigated to the folder I unzipped the libtcod 1.7.0 folder too and put in this line: c:\> python -c “import libtcodpy” and it still gives me an access denied. In the power shell I don’t get access denied but rather that it doesn’t know what c:\> is. If I navigate into the folder and then try to write the same code of “python -c “import libtcodpy” (without the c:\>) part I don’t get an error but it doesn’t seem to install correctly. Know what the reason for this could be. Also thanks for your virtual environment recommendation. – Gabriel Ketzer Sep 07 '18 at 13:51
  • 1
    I solved it by using the python tdl and installing the c++ redistributable, however thanks for the virtual environment tip I will be using it in future – Gabriel Ketzer Sep 07 '18 at 16:47