Remix: Parse error : source file requires different compiler version

Hi,
I am using this very simple example from your posts. I cannot get rid of the Parse error : source file requires different compiler version, etc… in remix. I have tried all kinds of different versions of compiler , still get this error, please advise, below is the sample code.

// SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;

import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.4.0-solc-0.7/contracts/token/ERC20/ERC20.sol";

contract Token is ERC20 {

    constructor () ERC20("Token", "TKN") {
        _mint(msg.sender, 1000000 * (10 ** uint256(decimals())));
    }
}
1 Like

Hi @Eric_Nickus,

Welcome to the community :wave:

I had the same issue and was able to resolve by removing the github directory.

I suggest trying to remove the github directory in Remix and trying to compile again.

The Remix team have created an issue for this: https://github.com/ethereum/remix-project/issues/991

Continuing the discussion from Remix: Parse error : source file requires different compiler version:

Thanks @abcoathup for the hint! I also deleted github folder in .dep folder and that worked :slight_smile: